comparison src/luan/impl/LuanParser.java @ 1267:9fa8b8389578

add LuanTable.luan; support metatable __gc(); add luan.sql;
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 12 Nov 2018 02:10:41 -0700
parents ba4daf107e07
children f41919741100
comparison
equal deleted inserted replaced
1266:05934fbf635a 1267:9fa8b8389578
1009 parser.begin(); 1009 parser.begin();
1010 if( parser.match('#') ) { 1010 if( parser.match('#') ) {
1011 Spaces(); 1011 Spaces();
1012 Expr exp = required(UnaryExpr(in)).single(); 1012 Expr exp = required(UnaryExpr(in)).single();
1013 Expr newExp = new Expr(Val.SINGLE,false); 1013 Expr newExp = new Expr(Val.SINGLE,false);
1014 newExp.add( "LuanImpl.len(luan," ); 1014 newExp.add( "LuanImpl.len(" );
1015 newExp.addAll( exp ); 1015 newExp.addAll( exp );
1016 newExp.add( ")" ); 1016 newExp.add( ")" );
1017 return parser.success(newExp); 1017 return parser.success(newExp);
1018 } 1018 }
1019 if( Minus() ) { 1019 if( Minus() ) {
1141 private Expr TableExpr() throws ParseException { 1141 private Expr TableExpr() throws ParseException {
1142 parser.begin(); 1142 parser.begin();
1143 if( !parser.match('{') ) 1143 if( !parser.match('{') )
1144 return parser.failure(null); 1144 return parser.failure(null);
1145 Expr tblExp = new Expr(Val.SINGLE,false); 1145 Expr tblExp = new Expr(Val.SINGLE,false);
1146 tblExp.add( "LuanImpl.table(" ); 1146 tblExp.add( "LuanImpl.table(luan," );
1147 Expr lastExp = tblExp; 1147 Expr lastExp = tblExp;
1148 List<Expr> builder = new ArrayList<Expr>(); 1148 List<Expr> builder = new ArrayList<Expr>();
1149 /* 1149 /*
1150 Spaces(); 1150 Spaces();
1151 Field(builder); 1151 Field(builder);