Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a89df0b
Create `SyntaxNode` which should act as a red node to the existing (g…
ggiraldez Oct 24, 2025
b8356f2
Reifiy `SyntaxNode` children into a vector and port a `SyntaxCursor`
ggiraldez Oct 29, 2025
3c1edce
Move `text_offset` into `SyntaxNode`
ggiraldez Oct 29, 2025
3fe1075
Add a version of queries for `SyntaxCursor`
ggiraldez Oct 29, 2025
a832e55
Fix clippy warnings and formatting
ggiraldez Oct 29, 2025
30e8155
Use `SyntaxNode` in IR nodes
ggiraldez Oct 29, 2025
dbd24b0
Use `SyntaxNode` to store terminals in the IR trees
ggiraldez Oct 30, 2025
a1f28b2
Use `SyntaxNode` to link definitions back to the CST
ggiraldez Oct 30, 2025
bcefe85
Remove `text_offset` from `SyntaxNode` and all `SyntaxCursor` code
ggiraldez Oct 31, 2025
8cd0dd5
Avoid instantiating `SyntaxNode`s that will be dropped immediately
ggiraldez Nov 3, 2025
b129a18
Add module to IR language to index the nodes in a tree
ggiraldez Nov 3, 2025
40cb165
Add backend pass to index output IR tree nodes
ggiraldez Nov 3, 2025
422423f
Update public_api.txt to appease CI
ggiraldez Nov 4, 2025
0ba7a95
Restore `SyntaxCursor` implementation
ggiraldez Nov 4, 2025
3bf0720
Implement an `IntoIr` for IR types to map them from `SyntaxNode`s
ggiraldez Nov 5, 2025
14e6399
Improve `SyntaxCursor` implementation
ggiraldez Nov 5, 2025
a5739ae
Update public_api.txt
ggiraldez Nov 5, 2025
ba7d957
Fix `rustdoc` errors
ggiraldez Nov 5, 2025
02469b5
Fix `SyntaxCursor::go_to_parent()`
ggiraldez Nov 5, 2025
54e8ddf
Tidy up feature flag for using `SyntaxNode` and put them under `__pri…
ggiraldez Nov 5, 2025
e2aa5ad
Partial commit
beta-ziliani Nov 11, 2025
0b4eb3e
Collecting unused definitions
beta-ziliani Nov 11, 2025
b6e0a61
little fixes
beta-ziliani Nov 11, 2025
430a6c6
comments and refactoring
beta-ziliani Nov 12, 2025
a8ad0c3
Remove duplicated code
beta-ziliani Nov 13, 2025
4270da2
moved type ast to binder mod
beta-ziliani Nov 13, 2025
106cc61
Revert inclusion of PartialEq
beta-ziliani Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/metaslang/cst/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ license = "MIT"
keywords = ["parser"]
categories = ["compilers", "parsing", "parser-implementations"]

[features]
syntax = []

[dependencies]
nom = { workspace = true }
serde = { workspace = true }
Expand Down
8 changes: 8 additions & 0 deletions crates/metaslang/cst/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ pub mod kinds;
pub mod nodes;
pub mod query;
pub mod text_index;

#[cfg(feature = "syntax")]
#[allow(missing_docs)]
pub mod syntax_node;

#[cfg(feature = "syntax")]
#[allow(missing_docs)]
pub mod syntax_cursor;
6 changes: 6 additions & 0 deletions crates/metaslang/cst/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ mod parser;
pub use engine::{Capture, QueryMatch, QueryMatchIterator};
pub use model::Query;
pub use parser::{CaptureQuantifier, QueryError};

#[cfg(feature = "syntax")]
mod syntax_engine;

#[cfg(feature = "syntax")]
pub use syntax_engine::{SyntaxCapture, SyntaxQueryMatch, SyntaxQueryMatchIterator};
Loading
Loading