This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Update editor modes for new keywords.
ClosedPublic

Authored by simon_tatham on Jan 14 2020, 4:35 AM.

Details

Summary

D71407 and D71474 added new keywords to the Tablegen language:
defvar, if, then and else. This commit updates the various
editor modes to highlight them appropriately.

Some of the modes also didn't include defset, so I've added that too
while I was there.

Diff Detail

Event Timeline

simon_tatham created this revision.Jan 14 2020, 4:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2020, 4:35 AM
lebedev.ri added inline comments.Jan 14 2020, 4:48 AM
llvm/utils/kate/llvm-tablegen.xml
11

I think defvar should go next to def

simon_tatham marked an inline comment as done.Jan 14 2020, 4:52 AM
simon_tatham added inline comments.
llvm/utils/kate/llvm-tablegen.xml
11

That would mean putting it in the 'class-like' section, which I thought probably wasn't right, on the grounds that defvar does not open a block with further declarations inside it, whereas def does, in common with the other 'class-like' keywords.

I admit I'm not a Kate user, though, so I don't know what difference (if any) that would actually make during editing.

lebedev.ri accepted this revision.Jan 14 2020, 5:03 AM

LG in principle.

llvm/utils/kate/llvm-tablegen.xml
11

On a second thought, let seems like a closer fit.

This revision is now accepted and ready to land.Jan 14 2020, 5:03 AM
simon_tatham marked an inline comment as done.Jan 14 2020, 5:10 AM
simon_tatham added inline comments.
llvm/utils/kate/llvm-tablegen.xml
11

Oh yes, I hadn't noticed def appeared in the objects category as well! OK, I'll put defvar there, alongside let.

This revision was automatically updated to reflect the committed changes.