Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lexer support for string extractors with wildcards #144

Merged

Conversation

andyscott
Copy link
Contributor

Extractors against interpolated strings containing wildcards are currently unsupported and cause a ScalaLexerException with message "invalid string interpolation".

Snippet that triggers an exception:

def unwrapAnonInstance(tree: Tree) = tree match {
  case Block(
    q"""$_ class $name1 extends ..$_ { ..$stats }""" :: Nil,
    q"new ${ Ident(name2) }"
    ) if name1 == name2 ⇒
    Some(stats)
  case _ ⇒
    None
}

This PR fixes this. (Note: I wasn't positive what token should be emitted, so I left it at USCORE)

@kiritsuku
Copy link
Member

test this please

@ghprb-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://jenkins.scala-ide.org:8496/jenkins//job/ghprb-scalariform-sbt/6/

@kiritsuku
Copy link
Member

LGTM

kiritsuku added a commit that referenced this pull request Feb 18, 2016
Add lexer support for string extractors with wildcards
@kiritsuku kiritsuku merged commit 3815922 into scala-ide:master Feb 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants