Permalink
Browse files

Fix regression in `valueMap` handling

  • Loading branch information...
sirthias committed Feb 18, 2018
1 parent b0baf62 commit 2923ca4b09f49ad2886a53f441d883449ba50498
View
@@ -7,7 +7,7 @@ import org.scalajs.sbtplugin.cross.CrossType
val commonSettings = Seq(
version := "2.1.5-SNAPSHOT",
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.11.8", "2.12.1"),
crossScalaVersions := Seq("2.11.8", "2.12.4"),
organization := "org.parboiled",
homepage := Some(new URL("http://parboiled.org")),
description := "Fast and elegant PEG parsing in Scala - lightweight, easy-to-use, powerful",
@@ -45,8 +45,7 @@ trait RuleDSLBasics {
* a successful match.
*/
@compileTimeOnly("Calls to `valueMap` must be inside `rule` macro")
implicit def valueMap[T](m: Map[String, T])(implicit h: HListable[T]): RuleN[h.Out] =
valueMap(m, ignoreCase = false)(h)
implicit def valueMap[T](m: Map[String, T])(implicit h: HListable[T]): RuleN[h.Out] = `n/a`
/**
* Matches any of the given maps keys and pushes the respective value upon
@@ -85,6 +85,7 @@ trait OpTreeContext[OpTreeCtx <: ParserMacros.ParserContext] {
case q"$lhs.|[$a, $b]($rhs)" FirstOf(OpTree(lhs), OpTree(rhs))
case q"$a.this.ch($c)" CharMatch(c)
case q"$a.this.str($s)" StringMatch(s)
case q"$a.this.valueMap[$b]($m)($hl)" MapMatch(m, q"false")
case q"$a.this.valueMap[$b]($m, $ic)($hl)" MapMatch(m, ic)
case q"$a.this.ignoreCase($t)" IgnoreCase(t)
case q"$a.this.predicate($p)" CharPredicateMatch(p)

0 comments on commit 2923ca4

Please sign in to comment.