feat(compiler): adds support for quoted object keys in the parser

This commit is contained in:
Victor Berchet
2017-07-05 10:54:05 -07:00
committed by Jason Aden
parent 7ae8ad6aab
commit 798947efa4
5 changed files with 15 additions and 9 deletions

View File

@ -136,8 +136,12 @@ export class LiteralArray extends AST {
}
}
export type LiteralMapKey = {
key: string; quoted: boolean;
};
export class LiteralMap extends AST {
constructor(span: ParseSpan, public keys: any[], public values: any[]) { super(span); }
constructor(span: ParseSpan, public keys: LiteralMapKey[], public values: any[]) { super(span); }
visit(visitor: AstVisitor, context: any = null): any {
return visitor.visitLiteralMap(this, context);
}