feat(compiler): pass compilation unit to the parser

This commit is contained in:
vsavkin
2014-12-10 19:21:15 -08:00
parent d985045983
commit d5fcac4d7a
17 changed files with 109 additions and 72 deletions

View File

@ -385,8 +385,10 @@ export class FunctionCall extends AST {
export class ASTWithSource extends AST {
ast:AST;
source:string;
constructor(ast:AST, source:string) {
location:string;
constructor(ast:AST, source:string, location:string) {
this.source = source;
this.location = location;
this.ast = ast;
}
@ -407,7 +409,7 @@ export class ASTWithSource extends AST {
}
toString():string {
return this.source;
return `${this.source} in ${this.location}`;
}
}