fixed import of locations from SpiderMonkey AST

This commit is contained in:
Mihai Bazon
2012-10-05 15:05:06 +03:00
parent a9b6f9909a
commit ecd9f21467

View File

@@ -198,9 +198,9 @@
function my_start_token(moznode) {
return new AST_Token({
file : moznode.loc.start.source,
line : moznode.loc.start.line,
col : moznode.loc.start.column,
file : moznode.loc && moznode.loc.source,
line : moznode.loc && moznode.loc.start.line,
col : moznode.loc && moznode.loc.start.column,
pos : moznode.start,
endpos : moznode.start
});
@@ -208,9 +208,9 @@
function my_end_token(moznode) {
return new AST_Token({
file : moznode.loc.end.source,
line : moznode.loc.end.line,
col : moznode.loc.end.column,
file : moznode.loc && moznode.loc.source,
line : moznode.loc && moznode.loc.end.line,
col : moznode.loc && moznode.loc.end.column,
pos : moznode.end,
endpos : moznode.end
});