Mercurial > hg > truffle
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Parser.java @ 16685:888907296590
Backed out changeset: d654cd5ed05a
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Fri, 01 Aug 2014 18:14:43 -0700 |
parents | d654cd5ed05a |
children | 7c8ddb4233cd |
comparison
equal
deleted
inserted
replaced
16684:d654cd5ed05a | 16685:888907296590 |
---|---|
132 } | 132 } |
133 | 133 |
134 void Function() { | 134 void Function() { |
135 Expect(4); | 135 Expect(4); |
136 Expect(1); | 136 Expect(1); |
137 Token identifierToken = t; | 137 factory.startFunction(t); |
138 Expect(5); | 138 Expect(5); |
139 int bodyStartPos = t.charPos; | |
140 factory.startFunction(identifierToken, bodyStartPos); | |
141 if (la.kind == 1) { | 139 if (la.kind == 1) { |
142 Get(); | 140 Get(); |
143 factory.addFormalParameter(t); | 141 factory.addFormalParameter(t); |
144 while (la.kind == 6) { | 142 while (la.kind == 6) { |
145 Get(); | 143 Get(); |
219 } | 217 } |
220 | 218 |
221 SLStatementNode IfStatement(boolean inLoop) { | 219 SLStatementNode IfStatement(boolean inLoop) { |
222 SLStatementNode result; | 220 SLStatementNode result; |
223 Expect(14); | 221 Expect(14); |
222 Expect(5); | |
224 Token ifToken = t; | 223 Token ifToken = t; |
225 Expect(5); | |
226 SLExpressionNode condition = Expression(); | 224 SLExpressionNode condition = Expression(); |
227 Expect(7); | 225 Expect(7); |
228 SLStatementNode thenPart = Block(inLoop); | 226 SLStatementNode thenPart = Block(inLoop); |
229 SLStatementNode elsePart = null; | 227 SLStatementNode elsePart = null; |
230 if (la.kind == 15) { | 228 if (la.kind == 15) { |