Revision 9
Added by Willibald K. over 8 years ago
OoaTypesVisitor.java | ||
---|---|---|
39 | 39 |
import org.momut.ooas.ast.types.MapType; |
40 | 40 |
import org.momut.ooas.ast.types.OoActionSystemType; |
41 | 41 |
import org.momut.ooas.ast.types.TupleType; |
42 |
import org.momut.ooas.ast.types.UlyssesType;
|
|
42 |
import org.momut.ooas.ast.types.Type; |
|
43 | 43 |
import org.momut.ooas.parser.ParserError; |
44 | 44 |
import org.momut.ooas.parser.ParserState; |
45 | 45 |
import org.momut.ooas.utils.exceptions.ArgumentException; |
... | ... | |
51 | 51 |
/// </summary> |
52 | 52 |
public final class OoaTypesVisitor extends OoaCompleteAstTraversalVisitor |
53 | 53 |
{ |
54 |
private void Error(UlyssesType aType, String p)
|
|
54 |
private void Error(Type aType, String p) |
|
55 | 55 |
{ |
56 | 56 |
ParserError error = new ParserError(m_ParserState.filename, |
57 | 57 |
aType.identifier().line(), aType.identifier().column(), p); |
58 | 58 |
m_ParserState.AddErrorMessage(error); |
59 | 59 |
} |
60 | 60 |
|
61 |
HashSet<UlyssesType> typesSeen = new HashSet<UlyssesType>();
|
|
61 |
HashSet<Type> typesSeen = new HashSet<Type>();
|
|
62 | 62 |
|
63 | 63 |
|
64 | 64 |
@Override |
... | ... | |
89 | 89 |
} |
90 | 90 |
|
91 | 91 |
|
92 |
private interface Action<T extends UlyssesType> {
|
|
92 |
private interface Action<T extends Type> { |
|
93 | 93 |
void doIt(T param); |
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
/* Does the check for recursion */ |
97 |
private <T extends UlyssesType> void CheckForRecursion(T aType, String Message, Action<T> toCall)
|
|
97 |
private <T extends Type> void CheckForRecursion(T aType, String Message, Action<T> toCall) |
|
98 | 98 |
{ |
99 | 99 |
if (typesSeen.contains(aType)) |
100 | 100 |
{ |
Also available in: Unified diff
remove support for Qualitative Action Systems, rename UlyssesType to Type