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
Unknown Object (File)
Sat, Dec 21, 6:14 PM
Unknown Object (File)
Fri, Dec 20, 9:30 PM
Unknown Object (File)
Sun, Dec 15, 6:25 PM
Unknown Object (File)
Fri, Dec 13, 1:26 AM
Unknown Object (File)
Thu, Dec 12, 10:42 PM
Unknown Object (File)
Thu, Dec 12, 10:42 PM
Unknown Object (File)
Thu, Dec 12, 10:42 PM
Unknown Object (File)
Nov 28 2024, 3:44 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.