Skip to content
Permalink
v1
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
@ def parser[_: P] =
P( ("hello" | "goodbye").! ~ " ".rep(1) ~ ("world" | "seattle").! ~ End )
@ fastparse.parse("hello seattle", parser(_))
res41: Parsed[(String, String)] = Success(("hello", "seattle"), 13)
@ fastparse.parse("hello world", parser(_))
res42: Parsed[(String, String)] = Success(("hello", "world"), 15)