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)
Jun 20 2025, 11:23 AM
Unknown Object (File)
May 7 2025, 6:53 AM
Unknown Object (File)
May 6 2025, 1:19 PM
Unknown Object (File)
Apr 29 2025, 5:29 AM
Unknown Object (File)
Apr 21 2025, 7:06 PM
Unknown Object (File)
Apr 21 2025, 2:03 PM
Unknown Object (File)
Apr 18 2025, 5:17 AM
Unknown Object (File)
Apr 17 2025, 10:07 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
Branch
lexer1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20988
Build 28510: Run Core Tests
Build 28509: arc lint + arc unit

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.