Closed freinn closed 8 years ago
Probably the same as https://github.com/lihaoyi/fastparse/issues/72, upgrading to scalaVersion := "2.11.8"
should make it go away i think...
I was getting the value ~ is not a member of String
error using Scala 2.13. I could work around it by surrounding the first string with P()
. So instead of:
val ab = P("a" ~ "b")
I have:
val ab = P(P("a") ~ "b")
And regarding the other error No implicit view available from
, it went away after using import fastparse.NoWhitespace._
you are probably missing import fastparse._
Hi!
I'm very newbie to Scala and a total newbie using fastparse.
I've created a very simple SBT project and tried to compile and run some simple parsers from the web examples, but I get a lot of compilation errors on sbt like this:
[error] /home/freinn/parsertests/src/main/scala/Main.scala:30: No implicit view available from String => fastparse.core.Parser[V]. [error] val ab = P( "a".rep ~ "b" ) [error] ^ [error] one error found error Compilation failed
Or another one:
[error] /home/freinn/tecsisaDSL/src/main/scala/Main.scala:22: value ~ is not a member of String [error] val ab = P("a" ~ "b") [error] ^ [error] /home/freinn/tecsisaDSL/src/main/scala/Main.scala:41: too many arguments for method println: (x: Any)Unit [error] println(ParserSet.val1, ParserSet.val2) [error] ^ [error] two errors found
I'm using 0.3.7 with the following line on build.sbt:
libraryDependencies += "com.lihaoyi" %% "fastparse" % "0.3.7"
I did the import (import fastparse.all._) in the beginning of my file and created an object ParserSet { ... } with all the copied/pasted code from the web examples.