Revision 12
Added by over 7 years ago
OoaPrologExpression.java | ||
---|---|---|
53 | 53 |
import org.momut.ooas.ast.identifiers.IdentifierKind; |
54 | 54 |
import org.momut.ooas.ast.types.EnumType; |
55 | 55 |
import org.momut.ooas.ast.types.FunctionType; |
56 |
import org.momut.ooas.ast.types.MetaType; |
|
56 | 57 |
import org.momut.ooas.ast.types.TypeKind; |
57 | 58 |
import org.momut.ooas.ast.types.Type; |
58 | 59 |
import org.momut.ooas.ast.types.ValuedEnumType; |
... | ... | |
282 | 283 |
@Override |
283 | 284 |
public void visit(TypeExpression typeExpression) |
284 | 285 |
{ |
285 |
if (typeExpression.type().kind() != TypeKind.EnumeratedType)
|
|
286 |
if (typeExpression.referredType().kind() != TypeKind.EnumeratedType)
|
|
286 | 287 |
{ |
287 |
m_emitter.Append(GetIdentifierString(typeExpression.type().identifier()));
|
|
288 |
m_emitter.Append(GetIdentifierString(typeExpression.referredType().identifier()));
|
|
288 | 289 |
} |
289 | 290 |
} |
290 | 291 |
|
... | ... | |
411 | 412 |
@Override |
412 | 413 |
public void visit(AccessExpression accessExpression) |
413 | 414 |
{ |
414 |
if (accessExpression.left().type().kind() != TypeKind.EnumeratedType &&
|
|
415 |
if (!(accessExpression.left().type().kind() == TypeKind.MetaType && ((MetaType)accessExpression.left().type()).Type().kind() == TypeKind.EnumeratedType ) &&
|
|
415 | 416 |
!(accessExpression.right().kind() == ExpressionKind.Identifier && |
416 | 417 |
((IdentifierExpression)accessExpression.right()).identifier().kind() == IdentifierKind.AttributeIdentifier)) |
417 | 418 |
{ |
Also available in: Unified diff
latest version of the ooas compiler, with grammar version 1.10