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
79c7cd6c
Commit
79c7cd6c
authored
Dec 04, 2020
by
Alexandru Dura
Browse files
Print source location for class fields
parent
1b1bca9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/teal0/backend/IRGen.jrag
View file @
79c7cd6c
...
...
@@ -473,6 +473,11 @@ aspect IRGen {
ctx.endBB();
}
syn IRVar VarDecl.genIR() = new IRVar(getIdDecl().genIR(), variableType().genIRTypeRef());
syn IRVar VarDecl.genIR() {
IRVar var = new IRVar(getIdDecl().genIR(), variableType().genIRTypeRef());
var.setSourceLocation(sourceLocation());
return var;
}
syn IRName IdDecl.genIR() = new IRName(getIdentifier());
}
ir/teal0/ast/IRPrint.jrag
View file @
79c7cd6c
...
...
@@ -105,6 +105,10 @@ aspect IRPrint {
getIRName().print(out);
out.print(" : ");
getIRTypeRef().print(out);
if (IRProgram.printSourceLocations) {
out.print("\t");
getSourceLocation().print(out);
}
}
public void IRCodeBB.print(PrintStream out) {
...
...
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