Add epics db - #8161
Conversation
|
Plain regex #match is too expensive; try to use #lua-match. For floats, that should be handled by the grammar, not the queries. Long lists of literal matches are also not ideal; it's better to make the nodes more targeted. |
4b6cf9b to
08e958c
Compare
It seems
I'll see if I can do that.
I'm not sure what you meant by that. |
08e958c to
74667ad
Compare
|
No, regexes are much more expensive (in Neovim) since they need to cross into vimscript. |
|
For the number of builtin field names, because there's a lot of them, with names that are hard to remember, I wanted the editor to highlight me when I make typos. Removing them would make it less useful, in my opinion. |
|
Syntax highlighting is not linting, so that's a no-goal (for this project). As long as correct code is highlighted correctly, we care about performance and maintainability but not about how incorrect code is highlighted. You can add custom queries on top of that, either in your personal config or a plugin. |
74667ad to
53dd062
Compare
|
@clason I've removed most of the items in the long |
|
I don't think this needs a separate language for string expansions, should it? We have similar constructs in javascript/python and they manage to parse this within the top-level grammar |
|
@ribru17 I've separated the string expansion as a separate grammar because it's a specific language in the EPICS ecosystem that's used in at least 3-4 different grammars ( |
ribru17
left a comment
There was a problem hiding this comment.
Change looks fine but definitely would be nice to remove the large literal checks
53dd062 to
f4ca663
Compare
f4ca663 to
dd96bc6
Compare
Name of language
EPICS database and database definitions
Includes the
epics_msi_templatelanguage, which is a fancy way of saying "EPICS macros", which are used in other languages that I'll upstream after this PR.Representative code sample
Parser repo
Parsed tree for code sample
Queries
Source of queries: adapted from the queries in the tree-sitter grammar repos.
Screenshots of code sample