Modifier and Type | Field and Description |
---|---|
ASTNode.DataType |
ASTFunction.returnType |
ASTNode.DataType |
Symbol.type
Data type
|
ASTNode.DataType |
ASTFunction.Parameter.type |
ASTNode.DataType |
ASTLiteral.type |
ASTNode.DataType |
ASTVariable.type |
Modifier and Type | Field and Description |
---|---|
List<ASTNode.DataType> |
Symbol.paramTypes
Data types of formal parameters (for function symbols, empty for others)
|
Modifier and Type | Method and Description |
---|---|
ASTNode.DataType |
ASTNode.getType()
Retrieve the type
|
ASTNode.DataType |
MyDecafParser.parseType(Queue<Token> tokens) |
static ASTNode.DataType |
ASTNode.DataType.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ASTNode.DataType[] |
ASTNode.DataType.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
void |
MyDecafAnalysis.assertType(ASTNode node,
ASTNode.DataType expectedType) |
void |
BuildSymbolTables.insertPrintFunctionSymbol(String name,
ASTNode.DataType type)
Add a symbol for a hard-coded function to the current (innermost) scope.
|
void |
ASTNode.setType(ASTNode.DataType type)
Initialize type
|
static String |
ASTNode.typeToString(ASTNode.DataType t)
Returns a human-readable version of Decaf data types.
|
Modifier and Type | Method and Description |
---|---|
void |
MyDecafAnalysis.assertValidParameters(List<ASTNode.DataType> formalTypes,
List<ASTExpression> actualArgs,
SourceInfo src) |
Constructor and Description |
---|
ASTFunction(String name,
ASTNode.DataType returnType,
ASTBlock body) |
ASTLiteral(ASTNode.DataType type,
Object value) |
ASTVariable(String name,
ASTNode.DataType type) |
ASTVariable(String name,
ASTNode.DataType type,
int arrayLength) |
Parameter(String name,
ASTNode.DataType type) |
Symbol(String name,
ASTNode.DataType type)
Create a new scalar symbol
|
Symbol(String name,
ASTNode.DataType type,
boolean isArray,
int length)
Create a new array symbol
|
Symbol(String name,
ASTNode.DataType returnType,
List<ASTNode.DataType> paramTypes)
Create a new function symbol
|
Constructor and Description |
---|
Symbol(String name,
ASTNode.DataType returnType,
List<ASTNode.DataType> paramTypes)
Create a new function symbol
|
Copyright © 2019. All rights reserved.