fixed import of locations from SpiderMonkey AST
This commit is contained in:
@@ -198,9 +198,9 @@
|
|||||||
|
|
||||||
function my_start_token(moznode) {
|
function my_start_token(moznode) {
|
||||||
return new AST_Token({
|
return new AST_Token({
|
||||||
file : moznode.loc.start.source,
|
file : moznode.loc && moznode.loc.source,
|
||||||
line : moznode.loc.start.line,
|
line : moznode.loc && moznode.loc.start.line,
|
||||||
col : moznode.loc.start.column,
|
col : moznode.loc && moznode.loc.start.column,
|
||||||
pos : moznode.start,
|
pos : moznode.start,
|
||||||
endpos : moznode.start
|
endpos : moznode.start
|
||||||
});
|
});
|
||||||
@@ -208,9 +208,9 @@
|
|||||||
|
|
||||||
function my_end_token(moznode) {
|
function my_end_token(moznode) {
|
||||||
return new AST_Token({
|
return new AST_Token({
|
||||||
file : moznode.loc.end.source,
|
file : moznode.loc && moznode.loc.source,
|
||||||
line : moznode.loc.end.line,
|
line : moznode.loc && moznode.loc.end.line,
|
||||||
col : moznode.loc.end.column,
|
col : moznode.loc && moznode.loc.end.column,
|
||||||
pos : moznode.end,
|
pos : moznode.end,
|
||||||
endpos : moznode.end
|
endpos : moznode.end
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user