| 134 | | * VariableDefinitionNodeIF: Every variable is defined at one unique location in the code. The variable can be declared in several places. Each declaration has an associated definition. There can be many decls associated to one def. This is a linking thing: a single variable that is to be used in several files will be defined in one file but be declared in all |
| 135 | | * methods |
| 136 | | * scope: ? (global, input/output, local,...) |
| 137 | | * name: IdentifierNodeIF (together with scope, this uniquely identifies the variable) |
| 138 | | * type: TypeNodeIF |
| 139 | | * initializer: ExpressionNodeIF |
| | 134 | * VariableDeclarationNodeIF |
| | 135 | * Every variable is defined at one unique location in the code. The variable can be declared in several places. Each declaration has an associated definition. There can be many decls associated to one def. This is a linking thing: a single variable that is to be used in several files will be defined in one file but be declared in all |
| | 136 | * methods |
| | 137 | * isDefinition: boolean : is this the defining declaration? |
| | 138 | * definition: VariableDeclarationNodeIF : the defining declaration (may be null at first) |
| | 139 | * scope: ScopeIF |
| | 140 | * name: IdentifierNodeIF |
| | 141 | * type: TypeReferenceNodeIF |
| 142 | | * VariableDeclarationNodeIF |
| 143 | | * methods |
| 144 | | * definition: VariableDeclarationNodeIF (may be null at first) |
| 145 | | * scope: ScopeIF |
| | 144 | * initializer: ExpressionNodeIF : the initialization expression for this variable. May be null. Only a defining node an have such an expression. |
| | 145 | * FunctionDeclarationNodeIF |
| | 146 | * analogous to situation with variables, with the function body playing the role of variable initializer. I.e., a function may have several declarations ("prototypes" in C), but only one definition (i.e., one with a body). |
| | 147 | * methods |
| | 148 | * isDefinition: boolean |
| | 149 | * definition: FunctionDeclarationNodeIF : the defining declaration (the one with a body) |
| 147 | | * type: TypeNodeIF |
| 148 | | * typeQualifier: CONST, VOLATILE |
| 149 | | * storageClass: EXTERNAL, AUTO, STATIC, REGISTER |
| 150 | | * FunctionDefinitionNodeIF: a function with a body. As with variables, one def. can have many decls, but each decl is associated to at most one definition. |
| | 151 | * numFormals: int |
| | 152 | * formal(int i): VariableDeclarationNodeIF |
| | 153 | * formals: Iterator<VariableDeclarationNodeIF> |
| | 154 | * outputType: TypeReferenceNodeIF |
| | 155 | * body: BlockNodeIF (null iff !isDefinition) |
| | 156 | * TypeDefinitionNodeIF |
| | 157 | * a "typedef" in C |