Add Visibility, Div and some UnaryOps - #28
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds visibility modifiers, the division operator, and unary operators (minus, bitwise NOT) to the Inference language grammar. It updates the version from 0.0.37 to 0.0.38 and includes comprehensive test coverage for the new features.
Key Changes
- Adds
pubvisibility modifier support for definitions (functions, constants, types, enums, structs) - Implements division (
/) operator and unary operators (-,~,!) - Includes extensive test suites for unary expressions, generic function calls, and visibility modifiers
Reviewed changes
Copilot reviewed 13 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| grammar.js | Adds visibility and operator rules; renames struct field from 'value' to 'method'; updates number_literal precedence |
| src/grammar.json | Generated grammar JSON reflecting the new visibility and operator rules |
| src/node-types.json | Generated node types JSON with new visibility and operator nodes |
| test/corpus/expressions/unary.txt | Comprehensive test cases for unary operators including NOT, minus, and bitwise NOT |
| test/corpus/expressions/generic_call.txt | Test cases for generic function call syntax |
| test/corpus/expressions/binary.txt | Test cases for division operator usage |
| test/corpus/definitions/visibility.txt | Test cases for visibility modifiers across definition types |
| queries/highlights.scm | Syntax highlighting for operators and unary operators |
| inference.ebnf | Complete EBNF specification for the Inference language |
| package.json | Version bump and dependency updates |
| pyproject.toml | Version bump to 0.0.38 |
| Makefile | Version bump to 0.0.38 |
| Cargo.toml | Version bump to 0.0.38 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Vibility, Div and some UnaryOpsVisibility, Div and some UnaryOps
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.
No description provided.