|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jltools.ext.jl.ast.Node_c | +--jltools.ext.jl.ast.Stmt_c | +--jltools.ext.jl.ast.LocalDecl_c
A local variable declaration statement: a type, a name and an optional initializer.
Inner classes inherited from class jltools.ext.jl.ast.Node_c |
Node_c.StringCodeWriter |
Fields inherited from class jltools.ext.jl.ast.Node_c |
ext, position |
Constructor Summary | |
LocalDecl_c(Ext ext,
Position pos,
Flags flags,
TypeNode type,
java.lang.String name,
Expr init)
|
Method Summary | |
Node |
buildTypes_(TypeBuilder tb)
Build type objects for the declaration. |
protected Declarator |
decl()
Get the declarator. |
protected LocalDecl |
decl(Declarator decl)
Set the declarator. |
Type |
declType()
Get the type of the declaration. |
void |
dump(CodeWriter w)
Dump the AST node for debugging purposes. |
Flags |
flags()
Get the flags of the declaration. |
LocalDecl |
flags(Flags flags)
Set the flags of the declaration. |
Expr |
init()
Get the initializer of the declaration. |
LocalDecl |
init(Expr init)
Set the initializer of the declaration. |
void |
leaveScope(Context c)
Add the variable to the scope after the declaration. |
LocalInstance |
localInstance()
Get the local instance of the declaration. |
LocalDecl |
localInstance(LocalInstance li)
Set the local instance of the declaration. |
java.lang.String |
name()
Get the name of the declaration. |
LocalDecl |
name(java.lang.String name)
Set the name of the declaration. |
protected LocalDecl_c |
reconstruct(TypeNode type,
Expr init)
Reconstruct the declaration. |
Node |
reconstructTypes_(NodeFactory nf,
TypeSystem ts,
Context c)
Reconstruct the type objects for the declaration. |
java.lang.String |
toString()
|
void |
translate_(CodeWriter w,
Translator tr)
Write the declaration to an output file. |
TypeNode |
type()
Get the type node of the declaration. |
LocalDecl |
type(TypeNode type)
Set the type node of the declaration. |
Node |
typeCheck_(TypeChecker tc)
Type check the declaration. |
Node |
typeCheckOverride_(TypeChecker tc)
Type check the declaration. |
Node |
visitChildren(NodeVisitor v)
Visit the children of the declaration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jltools.ast.Node |
buildTypesOverride_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, enterScope, exceptionCheck_, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, position, position, visit |
Constructor Detail |
public LocalDecl_c(Ext ext, Position pos, Flags flags, TypeNode type, java.lang.String name, Expr init)
Method Detail |
public Type declType()
declType
in interface LocalDecl
public Flags flags()
flags
in interface LocalDecl
public LocalDecl flags(Flags flags)
flags
in interface LocalDecl
public TypeNode type()
type
in interface LocalDecl
public LocalDecl type(TypeNode type)
type
in interface LocalDecl
public java.lang.String name()
name
in interface LocalDecl
public LocalDecl name(java.lang.String name)
name
in interface LocalDecl
public Expr init()
init
in interface LocalDecl
public LocalDecl init(Expr init)
init
in interface LocalDecl
public LocalInstance localInstance()
localInstance
in interface LocalDecl
public LocalDecl localInstance(LocalInstance li)
localInstance
in interface LocalDecl
protected Declarator decl()
protected LocalDecl decl(Declarator decl)
protected LocalDecl_c reconstruct(TypeNode type, Expr init)
public Node visitChildren(NodeVisitor v)
visitChildren
in interface Node
visitChildren
in class Node_c
public void leaveScope(Context c)
leaveScope
in interface Node
leaveScope
in class Node_c
public Node buildTypes_(TypeBuilder tb) throws SemanticException
buildTypes_
in interface Node
buildTypes_
in class Node_c
public Node typeCheckOverride_(TypeChecker tc) throws SemanticException
typeCheckOverride_
in interface Node
typeCheckOverride_
in class Node_c
jltools.ast.Node
tc
- The type checking visitor.public Node typeCheck_(TypeChecker tc) throws SemanticException
typeCheck_
in interface Node
typeCheck_
in class Node_c
public java.lang.String toString()
toString
in class Node_c
public void translate_(CodeWriter w, Translator tr)
translate_
in interface Node
translate_
in class Node_c
jltools.ast.Node
w
- The code writer to which to write.tr
- The translation pass. This is not a visitor.public void dump(CodeWriter w)
Node
dump
in interface Node
dump
in class Node_c
public Node reconstructTypes_(NodeFactory nf, TypeSystem ts, Context c) throws SemanticException
reconstructTypes_
in interface Node
reconstructTypes_
in class Node_c
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |