|
|
@ -42,22 +42,17 @@ import parser.type.*; |
|
|
public class ConstantList extends ASTElement |
|
|
public class ConstantList extends ASTElement |
|
|
{ |
|
|
{ |
|
|
// Name/expression/type triples to define constants |
|
|
// Name/expression/type triples to define constants |
|
|
private Vector<String> names; |
|
|
|
|
|
private Vector<Expression> constants; // these can be null, i.e. undefined |
|
|
|
|
|
private Vector<Type> types; |
|
|
|
|
|
|
|
|
private Vector<String> names = new Vector<String>(); |
|
|
|
|
|
private Vector<Expression> constants = new Vector<Expression>(); // these can be null, i.e. undefined |
|
|
|
|
|
private Vector<Type> types = new Vector<Type>(); |
|
|
// We also store an ExpressionIdent to match each name. |
|
|
// We also store an ExpressionIdent to match each name. |
|
|
// This is to just to provide positional info. |
|
|
// This is to just to provide positional info. |
|
|
private Vector<ExpressionIdent> nameIdents; |
|
|
|
|
|
|
|
|
private Vector<ExpressionIdent> nameIdents = new Vector<ExpressionIdent>(); |
|
|
|
|
|
|
|
|
// Constructor |
|
|
// Constructor |
|
|
|
|
|
|
|
|
public ConstantList() |
|
|
public ConstantList() |
|
|
{ |
|
|
{ |
|
|
// initialise |
|
|
|
|
|
names = new Vector<String>(); |
|
|
|
|
|
constants = new Vector<Expression>(); |
|
|
|
|
|
types = new Vector<Type>(); |
|
|
|
|
|
nameIdents = new Vector<ExpressionIdent>(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Set methods |
|
|
// Set methods |
|
|
|