Page MenuHomePhabricator

Fix two issues with the Java syntax highlighter lexer
ClosedPublic

Authored by epriestley on Oct 5 2018, 5:52 PM.
Tags
None
Referenced Files
F13091613: D19731.diff
Thu, Apr 25, 3:06 AM
Unknown Object (File)
Fri, Apr 19, 8:02 PM
Unknown Object (File)
Thu, Apr 11, 10:35 AM
Unknown Object (File)
Sat, Mar 30, 3:13 PM
Unknown Object (File)
Wed, Mar 27, 12:43 AM
Unknown Object (File)
Wed, Mar 27, 12:09 AM
Unknown Object (File)
Wed, Mar 27, 12:09 AM
Unknown Object (File)
Wed, Mar 27, 12:08 AM
Subscribers
None

Details

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)

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Oct 5 2018, 6:11 PM

(I'm also going to pick this to arcanist/wilds, but may stop picking everything individually in favor of some future "all remaining changes" change at some date in the future depending on how things go.)

This revision was automatically updated to reflect the committed changes.