fix: Updates to UDL Grammar and Python Package - #60
Merged
hkimura-intersys merged 5 commits intoSep 30, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes many updates to the UDL grammar that were done to define class members consistently. For examples, before some class members had their keywords outer node hidden, while others didn't. Now, none are hidden. The following were changed:
Breaking Grammar Changes
_method_keywords->method_keywords_expression_method_keywords->expression_method_keywords_external_method_keywords->external_method_keywords_call_method_keywords->call_method_keywords_query_keywords->query_keywords_trigger_keywords/_external_trigger_keywords->trigger_keywords/external_trigger_keywords_xdata_keywords->xdata_keywordsmethod_keyword_external_language->keyword_external_language_index_property_value/_index_type->index_property_value/index_typecolumn_name(in indices) |property_nameThe
highlights.scmandinjections.scmqueries inudl,objectscriptand thebindings are updated to match.
Other Grammar Changes
##safeexpression: now parsed like##expressionand aliased tokeyword_pound_expression(expr/grammar.js).Language = basic: accepted as an external method/trigger language.well as
Cardinality,InverseandOnDelete. This replaces the hard-codedrequired|readonly|InitialExpressionlist.(ELEMENTS)/(KEYS): no longer wrapped intoken().Scanner fix: embedded SQL mistaken for XML
lex_fenced_textincommon/scanner.hused to skip leading alphanumerics alongwith whitespace before checking for
<. So in something likeit reached the
<, treated the body as XML, and produced a bad parse. Now onlywhitespace is skipped before the
<check. A corpus test for this case was addedin
core/test/corpus/embedded-sql.txt.Injections
I added new injection queries to match java, javascript, and sql.
header has no
MimeType =.text/javascript→ javascript,application/sql→ sql,text/x-java-source→ java.Packaging
package.json,pyproject.toml,Cargo.toml,CMakeLists.txt,tree-sitter.jsonandcommon.mak.coreextra now requirestree-sitter>=0.25, since the parsers aregenerated at ABI 15. A binding test checks this.