Mercurial Hosting > luan
comparison src/luan/impl/LuanParser.java @ 1680:9ef19f5ea973
add // operator
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 02 Jun 2022 22:34:55 -0600 |
parents | eb89db694225 |
children | 6061be2cd84b |
comparison
equal
deleted
inserted
replaced
1679:39287902fb0c | 1680:9ef19f5ea973 |
---|---|
1028 newExp.add( "," ); | 1028 newExp.add( "," ); |
1029 newExp.addAll( exp2 ); | 1029 newExp.addAll( exp2 ); |
1030 newExp.add( ")" ); | 1030 newExp.add( ")" ); |
1031 exp = newExp; | 1031 exp = newExp; |
1032 } else if( parser.match('/') ) { | 1032 } else if( parser.match('/') ) { |
1033 Spaces(); | 1033 if( parser.match('/') ) { |
1034 exp = exp.single(); | 1034 Spaces(); |
1035 Expr exp2 = required(UnaryExpr()).single(); | 1035 exp = exp.single(); |
1036 Expr newExp = new Expr(Val.SINGLE,false); | 1036 Expr exp2 = required(UnaryExpr()).single(); |
1037 newExp.add( "LuanImpl.div(luan," ); | 1037 Expr newExp = new Expr(Val.SINGLE,false); |
1038 newExp.addAll( exp ); | 1038 newExp.add( "LuanImpl.idiv(luan," ); |
1039 newExp.add( "," ); | 1039 newExp.addAll( exp ); |
1040 newExp.addAll( exp2 ); | 1040 newExp.add( "," ); |
1041 newExp.add( ")" ); | 1041 newExp.addAll( exp2 ); |
1042 exp = newExp; | 1042 newExp.add( ")" ); |
1043 exp = newExp; | |
1044 } else { | |
1045 Spaces(); | |
1046 exp = exp.single(); | |
1047 Expr exp2 = required(UnaryExpr()).single(); | |
1048 Expr newExp = new Expr(Val.SINGLE,false); | |
1049 newExp.add( "LuanImpl.div(luan," ); | |
1050 newExp.addAll( exp ); | |
1051 newExp.add( "," ); | |
1052 newExp.addAll( exp2 ); | |
1053 newExp.add( ")" ); | |
1054 exp = newExp; | |
1055 } | |
1043 } else if( Mod() ) { | 1056 } else if( Mod() ) { |
1044 Spaces(); | 1057 Spaces(); |
1045 exp = exp.single(); | 1058 exp = exp.single(); |
1046 Expr exp2 = required(UnaryExpr()).single(); | 1059 Expr exp2 = required(UnaryExpr()).single(); |
1047 Expr newExp = new Expr(Val.SINGLE,false); | 1060 Expr newExp = new Expr(Val.SINGLE,false); |