class JFormalParameter extends JAST
compilationUnit, line
Constructor and Description |
---|
JFormalParameter(int line,
String name,
Type type)
Construct an AST node for a formal parameter declaration given its line
number, name, and type.
|
Modifier and Type | Method and Description |
---|---|
JAST |
analyze(Context context)
No analysis done here.
|
void |
codegen(CLEmitter output)
No code generated here.
|
String |
name()
Return the parameter's name.
|
Type |
setType(Type newType)
Set the type to the specified type.
|
Type |
type()
Return the parameter's type.
|
void |
writeToStdOut(PrettyPrinter p)
Write the information pertaining to this AST to STDOUT.
|
line, partialCodegen
public String name()
public Type type()
public Type setType(Type newType)
newType
- the new type.public void codegen(CLEmitter output)
public void writeToStdOut(PrettyPrinter p)
JAST
writeToStdOut
in class JAST
p
- for pretty printing with indentation.