Mercurial > hg > truffle
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Parser.java @ 16687:7c8ddb4233cd
SL/SourceAttribution: restore some attribution fixes that were lost in a tussle with hg; turn off tracing code in SL tests.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Mon, 04 Aug 2014 18:53:21 -0700 |
parents | 888907296590 |
children | 7661cc464239 |
comparison
equal
deleted
inserted
replaced
16686:a59d447dde94 | 16687:7c8ddb4233cd |
---|---|
132 } | 132 } |
133 | 133 |
134 void Function() { | 134 void Function() { |
135 Expect(4); | 135 Expect(4); |
136 Expect(1); | 136 Expect(1); |
137 factory.startFunction(t); | 137 Token identifierToken = t; |
138 Expect(5); | 138 Expect(5); |
139 int bodyStartPos = t.charPos; | |
140 factory.startFunction(identifierToken, bodyStartPos); | |
139 if (la.kind == 1) { | 141 if (la.kind == 1) { |
140 Get(); | 142 Get(); |
141 factory.addFormalParameter(t); | 143 factory.addFormalParameter(t); |
142 while (la.kind == 6) { | 144 while (la.kind == 6) { |
143 Get(); | 145 Get(); |
217 } | 219 } |
218 | 220 |
219 SLStatementNode IfStatement(boolean inLoop) { | 221 SLStatementNode IfStatement(boolean inLoop) { |
220 SLStatementNode result; | 222 SLStatementNode result; |
221 Expect(14); | 223 Expect(14); |
224 Token ifToken = t; | |
222 Expect(5); | 225 Expect(5); |
223 Token ifToken = t; | |
224 SLExpressionNode condition = Expression(); | 226 SLExpressionNode condition = Expression(); |
225 Expect(7); | 227 Expect(7); |
226 SLStatementNode thenPart = Block(inLoop); | 228 SLStatementNode thenPart = Block(inLoop); |
227 SLStatementNode elsePart = null; | 229 SLStatementNode elsePart = null; |
228 if (la.kind == 15) { | 230 if (la.kind == 15) { |