File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
shared/src/test/scala/scala/util/parsing/combinator Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -151,14 +151,14 @@ private object grammars1 extends StandardTokenParsers with PackratParsers {
151
151
*/
152
152
153
153
154
- val term : PackratParser [Int ] = (term~ (" +" ~> fact) ^^ {case x~ y => x+ y}
155
- | term~ (" -" ~> fact) ^^ {case x~ y => x- y}
156
- | fact)
157
-
158
- val fact : PackratParser [Int ] = (fact~ (" *" ~> numericLit) ^^ {case x~ y => x* y.toInt}
159
- | fact~ (" /" ~> numericLit) ^^ {case x~ y => x/ y.toInt}
160
- | " (" ~> term<~ " )"
161
- | numericLit ^^ {_.toInt})
154
+ val term : PackratParser [Int ] = (term~ (" +" ~> fact) ^^ {case x~ y => x+ y}
155
+ | term~ (" -" ~> fact) ^^ {case x~ y => x- y}
156
+ | fact)
157
+
158
+ val fact : PackratParser [Int ] = (fact~ (" *" ~> numericLit) ^^ {case x~ y => x* y.toInt}
159
+ | fact~ (" /" ~> numericLit) ^^ {case x~ y => x/ y.toInt}
160
+ | " (" ~> term<~ " )"
161
+ | numericLit ^^ {_.toInt})
162
162
}
163
163
164
164
private object grammars2 extends StandardTokenParsers with PackratParsers {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class T1100 {
24
24
def p1 : Parser [Char ] = accept('a' ) | err(" errors are propagated" )
25
25
}
26
26
27
- val expected = """ [1.4] error: errors are propagated
27
+ val expected = """ [1.4] error: errors are propagated
28
28
29
29
aaab
30
30
^"""
You can’t perform that action at this time.
0 commit comments