Mercurial Hosting > luan
comparison src/luan/interp/LuanParser.java @ 49:8ede219cd111
add WebShell
git-svn-id: https://luan-java.googlecode.com/svn/trunk@50 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 28 Dec 2012 19:35:04 +0000 |
parents | 64ecb7a3aad7 |
children | 28dfd91a816c |
comparison
equal
deleted
inserted
replaced
48:64ecb7a3aad7 | 49:8ede219cd111 |
---|---|
156 | 156 |
157 Rule Target() { | 157 Rule Target() { |
158 Var<Integer> start = new Var<Integer>(); | 158 Var<Integer> start = new Var<Integer>(); |
159 return Sequence( | 159 return Sequence( |
160 Spaces(), | 160 Spaces(), |
161 start.set(currentIndex()), | |
161 FirstOf( | 162 FirstOf( |
162 Sequence( ExpList(), EOI ), | |
163 Sequence( | 163 Sequence( |
164 start.set(currentIndex()), | 164 ExpList(), |
165 EOI, | |
166 push( new ReturnStmt( se(start.get()), (Expressions)pop() ) ) | |
167 ), | |
168 Sequence( | |
165 action( frame.isVarArg = true ), | 169 action( frame.isVarArg = true ), |
166 Block(), | 170 Block(), |
167 EOI, | 171 EOI |
168 push( newChunk(start.get()) ) | |
169 ) | 172 ) |
170 ) | 173 ), |
174 push( newChunk(start.get()) ) | |
171 ); | 175 ); |
172 } | 176 } |
173 | 177 |
174 Rule Block() { | 178 Rule Block() { |
175 Var<List<Stmt>> stmts = new Var<List<Stmt>>(new ArrayList<Stmt>()); | 179 Var<List<Stmt>> stmts = new Var<List<Stmt>>(new ArrayList<Stmt>()); |