Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christoph Reichenbach
EDAP15-exercise-3
Commits
f2b3e338
Commit
f2b3e338
authored
Dec 16, 2020
by
Christoph Reichenbach
Browse files
Expose array field types
parent
7c0849e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/teal2/frontend/TypeAnalysis.jrag
View file @
f2b3e338
...
...
@@ -30,10 +30,15 @@ aspect TypeAnalysis {
TypeDecl implements TypeDefinition;
TypeVarDecl implements TypeDefinition;
Type implements TypeDefinition;
syn
TypeDefinition Type.qualifiedTypeDefinition(
) {
syn
IdDecl Type.memberLookup(String s
) {
TypeDefinition td = (TypeDefinition) getIdUse().lookup().getDecl();
return new QualifiedTypeDefinition(td, getTypeQualifiers());
return td.memberLookup(s);
}
syn TypeDefinition Type.qualifiedTypeDefinition() {
return this;
}
// The following gives us the type of the expression if and only if we know the type precisely
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment