-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(search): Add Syntax Highlighting for Hack Language #62770
Conversation
.../src/highlighting/snapshots/syntax_analysis__highlighting__tree_sitter__test__hack.hack.snap
Outdated
Show resolved
Hide resolved
.../src/highlighting/snapshots/syntax_analysis__highlighting__tree_sitter__test__hack.hack.snap
Outdated
Show resolved
Hide resolved
Please file 1-2 issues upstream so that we can link them here. |
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
.../src/highlighting/snapshots/syntax_analysis__highlighting__tree_sitter__test__hack.hack.snap
Outdated
Show resolved
Hide resolved
Thanks for doing this! I know you have the tree-sitter grammar already, but we also have a slightly-more-up-to-date TextMate grammar here that supports |
@muglug Thanks. Our highlighting is based on tree-sitter, so would be great to get the missing parts added to the hack tree-sitter lib. I plan to file issues there on what I found |
Sounds good — at Slack we’re not yet using modules, so that’s no sort of blocker. Once we start considering that we’ll push necessary changes to the tree-sitter grammar. |
Yea I think the bigger annoyance will be the lack of string interpolation support |
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please go through https://docs.hhvm.com and identify the different syntax forms which aren't being tested and add tests for those. I've identified some which are missing, I haven't tried to be exhaustive.
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
...-images/syntax-highlighter/crates/syntax-analysis/src/highlighting/snapshots/files/hack.hack
Outdated
Show resolved
Hide resolved
docker-images/syntax-highlighter/crates/tree-sitter-all-languages/Cargo.toml
Outdated
Show resolved
Hide resolved
…xing issues discovered while doing so
…xing issues discovered while doing so
…fully using all the features together
As part of GRAPH-205 for support Hack language, this PR adds Syntax highlighting.
Fixes GRAPH-617
Key notes
module
statement and doesn't support string interpolation (parses just as string)Upstream bugs filed
Screenshots
Test plan