File tree Expand file tree Collapse file tree 3 files changed +9
-32
lines changed Expand file tree Collapse file tree 3 files changed +9
-32
lines changed Original file line number Diff line number Diff line change @@ -60,25 +60,16 @@ impl ArithmeticCommand {
6060 let mut ans = Self :: new ( ) ;
6161 ans. text = feeder. consume ( 2 ) ;
6262
63- loop {
64- if let Some ( c) = ArithmeticExpr :: parse ( feeder, core) {
65- if feeder. starts_with ( "," ) {
66- ans. text += & c. text ;
67- ans. text += & feeder. consume ( 1 ) ;
68- ans. expressions . push ( c) ;
69- continue ;
70- }
71-
72- if feeder. starts_with ( "))" ) {
73- ans. text += & c. text ;
74- ans. text += & feeder. consume ( 2 ) ;
75- ans. expressions . push ( c) ;
76- feeder. pop_backup ( ) ;
77- return Some ( ans) ;
78- }
63+ if let Some ( c) = ArithmeticExpr :: parse ( feeder, core) {
64+ if feeder. starts_with ( "))" ) {
65+ ans. text += & c. text ;
66+ ans. text += & feeder. consume ( 2 ) ;
67+ ans. expressions . push ( c) ;
68+ feeder. pop_backup ( ) ;
69+ return Some ( ans) ;
7970 }
80- feeder. rewind ( ) ;
81- return None ;
8271 }
72+ feeder. rewind ( ) ;
73+ return None ;
8374 }
8475}
Original file line number Diff line number Diff line change 1- ../test/test_compound.bash
2- ../test/test_others.bash
3- ../test/test_others.bash
4- ../../test/test_others.bash
5- ../../../test/test_others.bash
6- ../../../test/test_others.bash
7- ../../../test/test_others.bash
Original file line number Diff line number Diff line change 44./test_compound.bash
55./test_others.bash
66./test_job.bash
7- ../test/test_compound.bash
8- ../test/test_compound.bash
9- ../test/test_compound.bash
10- ../../test/test_others.bash
11- ../../test/test_others.bash
12- ../../../test/test_others.bash
13- ../../../test/test_others.bash
You can’t perform that action at this time.
0 commit comments