File tree 2 files changed +9
-9
lines changed
shared/src/test/scala/scala/util/parsing/combinator
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -140,14 +140,14 @@ private object grammars1 extends StandardTokenParsers with PackratParsers {
140
140
*/
141
141
142
142
143
- val term : PackratParser [Int ] = (term~ (" +" ~> fact) ^^ {case x~ y => x+ y}
144
- | term~ (" -" ~> fact) ^^ {case x~ y => x- y}
145
- | fact)
146
-
147
- val fact : PackratParser [Int ] = (fact~ (" *" ~> numericLit) ^^ {case x~ y => x* y.toInt}
148
- | fact~ (" /" ~> numericLit) ^^ {case x~ y => x/ y.toInt}
149
- | " (" ~> term<~ " )"
150
- | numericLit ^^ {_.toInt})
143
+ val term : PackratParser [Int ] = (term~ (" +" ~> fact) ^^ {case x~ y => x+ y}
144
+ | term~ (" -" ~> fact) ^^ {case x~ y => x- y}
145
+ | fact)
146
+
147
+ val fact : PackratParser [Int ] = (fact~ (" *" ~> numericLit) ^^ {case x~ y => x* y.toInt}
148
+ | fact~ (" /" ~> numericLit) ^^ {case x~ y => x/ y.toInt}
149
+ | " (" ~> term<~ " )"
150
+ | numericLit ^^ {_.toInt})
151
151
}
152
152
153
153
private object grammars2 extends StandardTokenParsers with PackratParsers {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class T1100 {
12
12
def p1 : Parser [Char ] = accept('a' ) | err(" errors are propagated" )
13
13
}
14
14
15
- val expected = """ [1.4] error: errors are propagated
15
+ val expected = """ [1.4] error: errors are propagated
16
16
17
17
aaab
18
18
^"""
You can’t perform that action at this time.
0 commit comments