Package net.jangaroo.jooc.ast
Class FunctionExpr
- java.lang.Object
-
- net.jangaroo.jooc.ast.NodeImplBase
-
- net.jangaroo.jooc.ast.Expr
-
- net.jangaroo.jooc.ast.FunctionExpr
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.jangaroo.jooc.ast.NodeImplBase
NodeImplBase.Scoped
-
-
Field Summary
Fields Modifier and Type Field Description static TypeANY_TYPEstatic StringARGUMENTSstatic IdeARGUMENTS_IDE-
Fields inherited from class net.jangaroo.jooc.ast.NodeImplBase
usesInstanceThis
-
-
Constructor Summary
Constructors Constructor Description FunctionExpr(FunctionDeclaration functionDeclaration, JooSymbol symFunction, Ide ide, JooSymbol lParen, Parameters params, JooSymbol rParen, TypeRelation optTypeRelation, BlockStatement optBody)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddImplicitParam(Parameter parameter)voidanalyze(AstNode parentNode)BlockStatementgetBody()List<? extends AstNode>getChildren()IdeDeclarationgetClassDeclaration()FunctionDeclarationgetFunctionDeclaration()JooSymbolgetFunSymbol()IdegetIde()JooSymbolgetLParen()TypeRelationgetOptTypeRelation()ParametersgetParams()StringgetReturnTypeFromAnnotation()JooSymbolgetRParen()JooSymbolgetSymbol()JooSymbolgetSymFunction()booleanhasBody()booleanisArgumentsUsedAsArray()booleanisExplicitThisUsed()booleanisThisAliased(boolean allowArrowFunctions)booleanrewriteToArrowFunction()voidscope(Scope scope)voidsetThisDefined()voidvisit(AstVisitor visitor)-
Methods inherited from class net.jangaroo.jooc.ast.Expr
getType, isCompileTimeConstant, isOfAS3Type, isRuntimeConstant, isStandAloneConstant, setType
-
Methods inherited from class net.jangaroo.jooc.ast.NodeImplBase
analyze, getParentNode, isAssignmentLHS, makeChildren, notifyInstanceThisUsed, propagateInstanceThisUsed, scope, usesInstanceThis, withNewDeclarationScope, withNewLabelScope
-
-
-
-
Field Detail
-
ARGUMENTS
public static final String ARGUMENTS
- See Also:
- Constant Field Values
-
ARGUMENTS_IDE
public static final Ide ARGUMENTS_IDE
-
ANY_TYPE
public static final Type ANY_TYPE
-
-
Constructor Detail
-
FunctionExpr
public FunctionExpr(FunctionDeclaration functionDeclaration, JooSymbol symFunction, Ide ide, JooSymbol lParen, Parameters params, JooSymbol rParen, TypeRelation optTypeRelation, BlockStatement optBody)
-
-
Method Detail
-
getReturnTypeFromAnnotation
public String getReturnTypeFromAnnotation()
-
getChildren
public List<? extends AstNode> getChildren()
- Specified by:
getChildrenin interfaceAstNode- Overrides:
getChildrenin classNodeImplBase
-
visit
public void visit(AstVisitor visitor) throws IOException
- Throws:
IOException
-
getFunctionDeclaration
public FunctionDeclaration getFunctionDeclaration()
-
getParams
public Parameters getParams()
-
getBody
public BlockStatement getBody()
-
getSymbol
public JooSymbol getSymbol()
-
getClassDeclaration
public IdeDeclaration getClassDeclaration()
-
scope
public void scope(Scope scope)
-
analyze
public void analyze(AstNode parentNode)
- Specified by:
analyzein interfaceAstNode- Overrides:
analyzein classNodeImplBase
-
addImplicitParam
public void addImplicitParam(Parameter parameter)
-
setThisDefined
public void setThisDefined()
-
hasBody
public boolean hasBody()
-
getIde
public Ide getIde()
-
getSymFunction
public JooSymbol getSymFunction()
-
getLParen
public JooSymbol getLParen()
-
getOptTypeRelation
public TypeRelation getOptTypeRelation()
-
getRParen
public JooSymbol getRParen()
-
getFunSymbol
public JooSymbol getFunSymbol()
-
isThisAliased
public boolean isThisAliased(boolean allowArrowFunctions)
-
isExplicitThisUsed
public boolean isExplicitThisUsed()
-
rewriteToArrowFunction
public boolean rewriteToArrowFunction()
-
isArgumentsUsedAsArray
public boolean isArgumentsUsedAsArray()
-
-