Package net.jangaroo.jooc.ast
Class ObjectLiteral
- java.lang.Object
-
- net.jangaroo.jooc.ast.NodeImplBase
-
- net.jangaroo.jooc.ast.Expr
-
- net.jangaroo.jooc.ast.ObjectLiteral
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.jangaroo.jooc.ast.NodeImplBase
NodeImplBase.Scoped
-
-
Field Summary
-
Fields inherited from class net.jangaroo.jooc.ast.NodeImplBase
usesInstanceThis
-
-
Constructor Summary
Constructors Constructor Description ObjectLiteral(JooSymbol lBrace, CommaSeparatedList<ObjectFieldOrSpread> fields, JooSymbol optComma, JooSymbol rBrace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidanalyze(AstNode parentNode)List<? extends AstNode>getChildren()CommaSeparatedList<ObjectFieldOrSpread>getFields()JooSymbolgetLBrace()JooSymbolgetOptComma()JooSymbolgetRBrace()JooSymbolgetSymbol()booleanisStandAloneConstant()Whether this expression denotes a stand-alone constant, that is, a constant that can be derived without looking at other classes.voidscope(Scope scope)voidvisit(AstVisitor visitor)-
Methods inherited from class net.jangaroo.jooc.ast.Expr
getType, isCompileTimeConstant, isOfAS3Type, isRuntimeConstant, setType
-
Methods inherited from class net.jangaroo.jooc.ast.NodeImplBase
analyze, getParentNode, isAssignmentLHS, makeChildren, notifyInstanceThisUsed, propagateInstanceThisUsed, scope, usesInstanceThis, withNewDeclarationScope, withNewLabelScope
-
-
-
-
Constructor Detail
-
ObjectLiteral
public ObjectLiteral(JooSymbol lBrace, CommaSeparatedList<ObjectFieldOrSpread> fields, JooSymbol optComma, JooSymbol rBrace)
- Parameters:
lBrace- the left bracefields- the object fields, either ObjectField or spread (UnaryOpExpr(sym.REST, expr))optComma- null for the time being, Flex compc does not accept a trailing comma, contrary to array literals...rBrace- the right brace
-
-
Method Detail
-
getChildren
public List<? extends AstNode> getChildren()
- Specified by:
getChildrenin interfaceAstNode- Overrides:
getChildrenin classNodeImplBase
-
visit
public void visit(AstVisitor visitor) throws IOException
- Throws:
IOException
-
scope
public void scope(Scope scope)
-
analyze
public void analyze(AstNode parentNode)
- Specified by:
analyzein interfaceAstNode- Overrides:
analyzein classNodeImplBase
-
isStandAloneConstant
public boolean isStandAloneConstant()
Description copied from class:ExprWhether this expression denotes a stand-alone constant, that is, a constant that can be derived without looking at other classes.- Overrides:
isStandAloneConstantin classExpr- Returns:
- whether this expression denotes a stand-alone constant
-
getSymbol
public JooSymbol getSymbol()
-
getLBrace
public JooSymbol getLBrace()
-
getFields
public CommaSeparatedList<ObjectFieldOrSpread> getFields()
-
getOptComma
public JooSymbol getOptComma()
-
getRBrace
public JooSymbol getRBrace()
-
-