UNPKG

js-ast-parser

Version:
15 lines (14 loc) 642 B
import { IdentifierLiteralExpression } from "./IdentifierLiteralExpression"; import { AstNode } from "../AstNode"; import { StringLiteralExpression } from "./StringLiteralExpression"; import { Expression } from "./Expression"; import { NodeCode } from "../../constants"; export class ObjectLiteralExpression extends Expression { type = 'ObjectLiteralExpression'; code = NodeCode.ObjectLiteralExpression properties: Array<{key: StringLiteralExpression | IdentifierLiteralExpression, value: AstNode}> = []; constructor(currentToken: any) { super(); this.loc.start = currentToken.loc.start; } }