[PATCH] D125427: [TableGen] Add a new json textmate description for syntax highlighting
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 13 12:23:24 PDT 2022
rriddle added inline comments.
================
Comment at: llvm/utils/textmate/tablegen.json:43-50
+ "begin": "/\\*",
+ "end": "\\*/",
+ "captures": {
+ "0": {
+ "name": "comment.block.tablegen"
+ }
+ },
----------------
sebastian-ne wrote:
> I’m not familiar with textmate parsers, so not sure if this is handled here (or can be handled), but tablegen supports nested block comments. I.e.
> ```
> /* nested /*
> comment */
> still a comment
> */
> ```
>
> (and for the record, only tablegen supports nested comments, LLVM IR or MIR doesn’t)
Oooh thanks for pointing this out. I just need to add recursion, but this slipped my mind.
================
Comment at: llvm/utils/textmate/tablegen.json:217
+ {
+ "match": "\\b(assert|else|foreach|defset|defvar|if|in|let|then)\\b",
+ "name": "keyword.other.tablegen"
----------------
sebastian-ne wrote:
> `field` is also a keyword (although deprecated)
Yep thanks, I originally dropped it because I wasn't sure how widespread it was actually still being used (despite the "deprecated" tagline). We have never used it in MLIR, but seems like it's still heavily used in older LLVM .td files.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125427/new/
https://reviews.llvm.org/D125427
More information about the llvm-commits
mailing list