Skip to content

Add scala syntax highlighter#26

Merged
oowekyala merged 13 commits into
pmd:masterfrom
oowekyala:scala-syntax
Sep 18, 2019
Merged

Add scala syntax highlighter#26
oowekyala merged 13 commits into
pmd:masterfrom
oowekyala:scala-syntax

Conversation

@oowekyala

@oowekyala oowekyala commented Sep 17, 2019

Copy link
Copy Markdown
Member

This experiments with the possibility of writing a highlighter with a flex lexer. I used a lexer from the intellij-scala plugin, simplified it a lot but kept the essential parts, including the ability to lex string interpolations of arbitrary depth. The same lexer may be used with minimal modifications to lex kotlin code, if at some point it's fully supported by PMD.

For example:

Capture du 2019-09-17 20-29-32

This does not require bumping the version of pmd-core, it's still compatible with 6.12.0.

@oowekyala oowekyala added this to the 6.19.0 milestone Sep 17, 2019
@oowekyala oowekyala added the enhancement New feature or request label Sep 17, 2019
@oowekyala oowekyala merged commit c551c00 into pmd:master Sep 18, 2019
@oowekyala oowekyala deleted the scala-syntax branch October 1, 2019 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant