Package iota
Class IVariable
java.lang.Object
iota.IAST
iota.IStatement
iota.IExpression
iota.IVariable
The AST node for an identifier used as a primary expression.
-
Field Summary
Fields inherited from class iota.IExpression
isStatementExpression, type
Fields inherited from class iota.IAST
compilationUnit, line
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAnalyzes and returns an IExpression.void
Performs code generation for this AST.void
Performs short-circuit code generation for a boolean expression, given the code emitter, a target label, and whether we branch to that label on true or on false.defn()
Returns the identifier's definition.name()
Returns the identifier name.void
toJSON
(JSONElement json) Stores information about this AST in JSON format.Methods inherited from class iota.IExpression
type
Methods inherited from class iota.IAST
line, preAnalyze
-
Constructor Details
-
IVariable
Constructs the AST node for a variable.- Parameters:
line
- line in which the variable occurs in the source file.name
- the name.
-
-
Method Details
-
name
Returns the identifier name.- Returns:
- the identifier name.
-
defn
Returns the identifier's definition.- Returns:
- the identifier's definition.
-
analyze
Analyzes and returns an IExpression.- Specified by:
analyze
in classIExpression
- Parameters:
context
- context in which names are resolved.- Returns:
- the analyzed (and possibly rewritten) AST subtree.
-
codegen
Performs code generation for this AST. -
codegen
Performs short-circuit code generation for a boolean expression, given the code emitter, a target label, and whether we branch to that label on true or on false.- Overrides:
codegen
in classIExpression
- Parameters:
output
- the code emitter.targetLabel
- the label to which we should branch.onTrue
- do we branch on true?
-
toJSON
Stores information about this AST in JSON format.
-