Skip to content

Commit 56b8042

Browse files
committed
Remove duplicated whitespace definition
1 parent 0160796 commit 56b8042

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

Diff for: src/main/scala/viper/silver/parser/FastParser.scala

+1-12
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ object FastParserCompanion {
3030
NoTrace((" " | "\t").rep)
3131
}
3232

33-
// TODO why is this duplicated? see FastParser below
3433
implicit val whitespace = {
3534
import NoWhitespace._
3635
implicit ctx: ParsingRun[_] =>
3736
NoTrace((("/*" ~ (!StringIn("*/") ~ AnyChar).rep ~ "*/") | ("//" ~ !StringIn("/") ~ CharsWhile(_ != '\n').? ~ ("\n" | End)) | " " | "\t" | "\n" | "\r").rep)
38-
// NoTrace((("/*" ~ (!StringIn("*/") ~ AnyChar).rep ~ "*/") | ("//" ~ CharsWhile(_ != '\n').? ~ ("\n" | End)) | " " | "\t" | "\n" | "\r").rep)
3937
}
4038

4139
def identStarts[$: P] = CharIn("A-Z", "a-z", "$_")
@@ -314,16 +312,7 @@ class FastParser {
314312
//////////////////////////
315313

316314
import fastparse._
317-
import FastParserCompanion.{ExtendedParsing, identContinues, identStarts, LeadingWhitespace, Pos, PositionParsing, reservedKw, reservedSym}
318-
319-
320-
// TODO why is this duplicated? see FastParserCompanion
321-
implicit val whitespace = {
322-
import NoWhitespace._
323-
implicit ctx: ParsingRun[_] =>
324-
NoTrace((("/*" ~ (!StringIn("*/") ~ AnyChar).rep ~ "*/") | ("//" ~ !StringIn("/") ~ CharsWhile(_ != '\n').? ~ ("\n" | End)) | " " | "\t" | "\n" | "\r").rep)
325-
// NoTrace((("/*" ~ (!StringIn("*/") ~ AnyChar).rep ~ "*/") | ("//" ~ CharsWhile(_ != '\n').? ~ ("\n" | End)) | " " | "\t" | "\n" | "\r").rep)
326-
}
315+
import FastParserCompanion.{ExtendedParsing, identContinues, identStarts, LeadingWhitespace, Pos, PositionParsing, reservedKw, reservedSym, whitespace}
327316

328317
implicit val lineCol: LineCol = new LineCol(this)
329318

0 commit comments

Comments
 (0)