Skip to content

Conversation

@hkimura-intersys
Copy link
Collaborator

Changes

  1. Updated README.md with instructions on how to add injection grammars to your own Rust project.
  2. Updated the scanner and udl/parser.c to fix any code causing warnings in the rust build (cargo build).
  3. Updated Cargo.toml to include all information needed to publish the crate to crates.io.
  4. Updated expr test with new AST (AST changed after allowing negative values for numeric_literal)
  5. Fix highlights.scm such that it correctly highlights classes, both those that extend something and those that don't. Before, it would only highlight classes that extended something.

Testing

Before changes, the highlights.scm file did not register a class as a class if it didn't extend something, as shown below:
image

With the changes, the class is now registered as a class as expected:
image

Tested that extends still works:
image

The tree-sitter grammars for injection languages is public
and easy to get. I added instructions on how to include
those grammars in one's project if they are developing
in Rust.
The AST has changed following the numeric_literal change,
which allowed negative values. Updating the expected test
result with the new AST so tests still pass.
Right now, syntax highlighting only works on a class that extends
something else. However classes that don't extend anything are
also valid classes. This change will include those classes in
syntax highlighting as well.
@hkimura-intersys hkimura-intersys self-assigned this Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant