HomePhabricator

Fix two issues with the Java syntax highlighter lexer

Description

Fix two issues with the Java syntax highlighter lexer

Summary:
Ref T13202. See PHI886. Two minor issues here:

  • I translated the double quoted string regexp incorrectly; we don't need to include backslash ("\") in the last character class. With it included, we failed to match "\n". We now match "\n" as a complete string literal correctly.
  • The class for "t" should be "kt", i.e. "Keyword.Type". For now, this is pretty informal; some day it will presumably be better formalized.

Test Plan:
Got proper highlighting output for this snippet:

Screen Shot 2018-10-05 at 10.49.14 AM.png (266×723 px, 17 KB)

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13202

Differential Revision: https://secure.phabricator.com/D19731

Details