Repository navigation
Releases
m2-syn 0.7.1
Changes
- Reject ordinary and raw string literals after quote modifiers in the native parser. Inputs such as
symbol "a"andsymbol ///a///now report a syntax error at the literal. This applies tosymbol,local,global,threadLocal, andthreadVariable. - Retain the invalid cell, trivia, and neighboring cells during realtime parsing. Other quoted tokens remain accepted.
- License
m2-synandm2-syn-macrosunder either MIT or Apache-2.0, at your option, and include both license texts in each crate package. - Update
m2-syn-macrosto 0.6.1 for its license metadata and files; macro behavior is unchanged.
Validation
- Workspace tests pass with and without default features.
- Both crate packages build, and packaged tests and all-target Clippy pass with warnings denied.
- All-feature rustdoc passes with warnings denied.
- The main package builds and tests against the released
m2-syn-macros0.6.1 dependency.
m2-syn 0.7.0
Changes
- Expose
frame_recoveringandFramedCellsas a stateless API for cell framing. Callers receive completed cells alongside an optional incomplete tail, with original source spans and trivia preserved. - For example,
a = 1\nf = x -> (yields the completeda = 1cell and the incompletef = x -> (tail. CellStream::newretains its existing behavior and still rejects an incomplete final cell.
Validation
- Packaged tests and doctests pass with and without default features.
- Packaged all-target Clippy passes with warnings denied.
- All-feature rustdoc passes with warnings denied.
- Package builds against the released
m2-syn-macros0.6.0 dependency.
m2-syn 0.6.1
Changes
- Parse empty parentheses
()as an empty sequence in the native parser. - Update
tree-sitter-macaulay2to 6.3.2, whose grammar classifies empty parentheses as a sequence.
m2-syn 0.6.0
Relicense m2-syn and m2-syn-macros under MIT; store every comment in the slot where it occurs, so both parsers keep comments in place and Cell::comments() is now an accessor over the new Cell::leading_trivia; add a BOF beginning-of-file marker so parsed files emit their opening, closing, and inter-cell layout byte for byte; recover layout beside comments at delimiters and unclosed groups ending in a line comment; accept x <- y as a parallel assignment target; and retain unfinished string literals in the realtime parsers. SourceFile::new now takes BOF as its first argument. See CHANGELOG.md for migration details.
m2-syn 0.5.0
Split typed-node and traversal expansion into smaller rust-analyzer-friendly stages; expose public default visit, visit_mut, and fold functions; make traversal and pretty support unconditional; update tree-sitter-macaulay2 to 6.1.2; and require a real comma for ExprPack. See CHANGELOG.md for migration details.
m2-syn 0.4.0
This release replaces the flat generated CST schema with explicit nested
strutuct! declarations and substantially expands semantic visitor dispatch.
Highlights:
- Adds semantic operator, assignment, lambda, member-access, indexing, control,
and related specialization families. - Keeps
Delimited,Punctuated, and ordinary vectors as transparent storage;
delimiter boundaries are presented explicitly asDelimiterleaves. - Adds
CellTokenStream,CellTokenTree, andCellTokenGroupfor framed parser
tokens while retaining the common lexical token atoms. - Treats adjacency as a binary operator and adds explicit augmented operators.
- Canonicalizes
Token!punctuation across quoted fragments and arbitrary Rust
token spacing. - Adds the
ProcMacrointerface andLiteralReturnTypestransformation example.
Breaking migration:
- Replace
PunctPair<L, P, R>withSeparatedPair<T, P>. - Do not construct
Punctuatedfor singleton values; it now requires a real
separator. - Update generated-node matches, visitors, folds, and constructors to the new
nested semantic categories. - Consume framed cells through
CellTokenStreamandCellTokenTree, projecting
throughto_token_streamorinto_token_streamwhen lexical tokens are
required.
See CHANGELOG.md for the complete release notes.
m2-syn 0.3.0
Highlights
- Split native processing into lexical
TokenStreamconstruction and cell-awareTokenize, with structural cell boundaries and syntactic adjacency markers. - Add
NativeRealtimeParserfor shell-oriented incremental parsing with incomplete-versus-invalid diagnostics. - Preserve physical EOF, source identity, delimiter state, transformed cell contents, and typed comment ownership.
- Make
pretty,tree-sitter, andwalkindependent features, including a renderer-independentPrettyNodeAPI. - Export
quote_m2!throughm2-synand keep generated nodes underm2_syn::nodes. - Keep exported
syntax!expansions independent of downstream feature names.
See the changelog for the complete list of changes.
m2-syn 0.2.0
Highlights
- Expand the typed schema directly from
syntax!; generated Rust files and the generator binary are no longer part of the workflow. - Add recovering native parsing and retained incremental Tree-sitter parsing for editor-style incomplete source updates.
- Preserve token, delimiter, literal, punctuation, and source-aware spans consistently across both parser backends.
- Align native and Tree-sitter lowering for assignments,
newinstallations, string escapes, empty components, qualified names, and float spellings. - Simplify the public parser, traversal, quoting, delimiter, and token APIs while enforcing complete public documentation.
Both m2-syn and m2-syn-macros are versioned 0.2.0.
v0.1.0
First published release. Typed syntax trees, generated Visit/VisitMut/Fold traversal, and dual native/tree-sitter parser backends for Macaulay2.
Published to crates.io as m2-syn and m2-syn-macros.