Revision 9
Added by Willibald K. over 8 years ago
Identifier.java | ||
---|---|---|
33 | 33 |
import org.momut.ooas.ast.IAst; |
34 | 34 |
import org.momut.ooas.ast.IAstVisitor; |
35 | 35 |
import org.momut.ooas.ast.IScope; |
36 |
import org.momut.ooas.ast.types.UlyssesType;
|
|
36 |
import org.momut.ooas.ast.types.Type; |
|
37 | 37 |
import org.momut.ooas.utils.exceptions.ArgumentException; |
38 | 38 |
import org.momut.ooas.utils.exceptions.NotImplementedException; |
39 | 39 |
|
... | ... | |
46 | 46 |
protected IScope m_definingScope; |
47 | 47 |
protected IdentifierKind m_identifierKind; |
48 | 48 |
protected String m_tokenText; |
49 |
protected UlyssesType m_Type;
|
|
49 |
protected Type m_Type; |
|
50 | 50 |
|
51 | 51 |
// basic attributes of an Identifier |
52 | 52 |
public final IdentifierKind kind() { return m_identifierKind; } // kind of identifier |
53 |
public final UlyssesType type() { return m_Type; } // type of identifier
|
|
53 |
public final Type type() { return m_Type; } // type of identifier |
|
54 | 54 |
public final IScope definingScope() { return m_definingScope; } // scope where it's defined |
55 | 55 |
|
56 | 56 |
// from lexer |
... | ... | |
63 | 63 |
|
64 | 64 |
|
65 | 65 |
public Identifier(Token aToken, |
66 |
UlyssesType aType,
|
|
66 |
Type aType, |
|
67 | 67 |
IdentifierKind aKind, |
68 | 68 |
IScope aDefiningScope) |
69 | 69 |
{ |
... | ... | |
75 | 75 |
m_definingScope = aDefiningScope; |
76 | 76 |
} |
77 | 77 |
|
78 |
public Identifier(String name, UlyssesType aType, IdentifierKind aKind, IScope aDefiningScope)
|
|
78 |
public Identifier(String name, Type aType, IdentifierKind aKind, IScope aDefiningScope) |
|
79 | 79 |
{ |
80 | 80 |
m_tokenText = name; |
81 | 81 |
m_line = 0; |
... | ... | |
107 | 107 |
throw new NotImplementedException(); |
108 | 108 |
} |
109 | 109 |
|
110 |
public final void SetType(UlyssesType aType)
|
|
110 |
public final void SetType(Type aType) |
|
111 | 111 |
{ |
112 | 112 |
if (aType == null) |
113 | 113 |
throw new ArgumentException("New type can not be null."); |
Also available in: Unified diff
remove support for Qualitative Action Systems, rename UlyssesType to Type