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)
Sun, Dec 29, 11:11 PM
Unknown Object (File)
Sun, Dec 29, 5:35 PM
Unknown Object (File)
Sun, Dec 29, 12:16 AM
Unknown Object (File)
Sat, Dec 21, 6:14 PM
Unknown Object (File)
Fri, Dec 20, 9:30 PM
Unknown Object (File)
Dec 15 2024, 6:25 PM
Unknown Object (File)
Dec 13 2024, 1:26 AM
Unknown Object (File)
Dec 12 2024, 10:42 PM
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.