comparison core/src/luan/impl/LuanParser.java @ 773:47add8eeb513

fix parse bug
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 23 Aug 2016 20:02:50 -0600
parents 98df1c19ed7d
children
comparison
equal deleted inserted replaced
772:bffbef96ca6d 773:47add8eeb513
773 Expr exp = AndExpr(in); 773 Expr exp = AndExpr(in);
774 if( exp==null ) 774 if( exp==null )
775 return parser.failure(null); 775 return parser.failure(null);
776 while( Keyword("or") ) { 776 while( Keyword("or") ) {
777 exp = exp.single(); 777 exp = exp.single();
778 Expr exp2 = required(RelExpr(in)).single(); 778 Expr exp2 = required(AndExpr(in)).single();
779 Expr newExp = new Expr(Val.SINGLE,true); 779 Expr newExp = new Expr(Val.SINGLE,true);
780 newExp.add( "(LuanImpl.cnd(t = " ); 780 newExp.add( "(LuanImpl.cnd(t = " );
781 newExp.addAll( exp ); 781 newExp.addAll( exp );
782 newExp.add( ") ? t : (" ); 782 newExp.add( ") ? t : (" );
783 newExp.addAll( exp2 ); 783 newExp.addAll( exp2 );