Package jminusminus
Class JFormalParameter
java.lang.Object
jminusminus.JAST
jminusminus.JFormalParameter
The AST node for a formal parameter declaration.
-
Field Summary
Fields inherited from class jminusminus.JAST
compilationUnit, line
-
Constructor Summary
ConstructorsConstructorDescriptionJFormalParameter
(int line, String name, Type type) Constructs an AST node for a formal parameter declaration. -
Method Summary
Methods inherited from class jminusminus.JAST
line, partialCodegen, preAnalyze, toJSON, unescape
-
Constructor Details
-
JFormalParameter
Constructs an AST node for a formal parameter declaration.- Parameters:
line
- line in which the parameter occurs in the source file.name
- parameter name.type
- parameter type.
-
-
Method Details
-
name
Returns the parameter's name.- Returns:
- the parameter's name.
-
type
Returns the parameter's type.- Returns:
- the parameter's type.
-
setType
Sets the parameter's type to the specified type.- Parameters:
type
- the new type.
-
analyze
Performs semantic analysis on this AST and returns the (possibly modified) AST. -
codegen
Performs code generation for this AST.
-