m2-syn 0.7.0

Parser, typed CST, traversal and procedural macros for Macaulay2
Documentation
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]

extern crate self as m2_syn;

pub use m2_syn_macros::syntax;

// Files are grouped by the stage they belong to — `lex/`, `parser/`,
// `migration/`, `schema/` — while the module paths stay flat, so `#[path]` carries the
// grouping without renaming anything the rest of the crate refers to.

// Declared first: these macros are textually scoped, so every module below
// must come after their definitions.
#[macro_use]
#[path = "schema/macros.rs"]
mod macros;

#[path = "parser/body.rs"]
mod body;
#[path = "lex/cell_stream.rs"]
mod cell_stream;
#[path = "migration/cst.rs"]
mod cst;
#[path = "parser/delimited.rs"]
mod delimited;
#[path = "lex/lexer.rs"]
pub mod lexer;
/// Generated typed Macaulay2 syntax nodes and literal-token types.
#[macro_use]
#[path = "schema/nodes.rs"]
pub mod nodes;
mod expansion;
#[path = "parser/native.rs"]
pub mod native;
#[path = "parser/parse.rs"]
pub mod parse;
mod parsed_file;
pub mod pretty;
#[path = "parser/punctuated.rs"]
pub mod punctuated;
#[path = "parser/realtime.rs"]
mod realtime;
mod recovery;
/// Internal support for span.
mod span;
#[path = "lex/token_stream.rs"]
/// Internal support for token stream.
mod token_stream;

#[cfg(feature = "tree-sitter")]
#[path = "migration/treesitter.rs"]
pub mod treesitter;

#[cfg(feature = "tree-sitter")]
#[path = "migration/trivia_transfer.rs"]
/// Internal support for carrying lexer trivia onto lowered syntax.
mod trivia_transfer;

#[cfg(feature = "tree-sitter")]
pub use treesitter::{
    ParseError, RealtimeParser, TreeSitterParser, parse_file, parse_file_recovering, parse_tokens,
};

pub use parse::{
    FragmentParseError, Parse, ParseStream, Parser, TokenParseError, migrate, parse_fragment_str,
    parse_with, parse2,
};

pub use body::{Body, Terminated};
pub use cell_stream::{
    CellStream, CellStreamError, CellTokenGroup, CellTokenStream, CellTokenTree, FramedCells,
    Tokenize, frame_recovering,
};
pub use cst::{
    CSTNodeClassLabel, ChildCursor, ExternalCstChild, ExternalCstNode, Migrate, MigrateError, Token,
};
pub use delimited::Delimited;
pub use expansion::ProcMacro;
pub use expansion::{LiteralReturnTypes, LiteralReturnTypesError};
#[doc(hidden)]
pub use lexer::{__qualified_identifier_spans, __quote_fragment};
pub use lexer::{LexError, LexErrorKind, lex, lex_recovering, lex_str, lex_str_recovering};
#[doc(hidden)]
pub use m2_syn_macros::__SyntaxWalk;
#[doc(hidden)]
pub use m2_syn_macros::__syntax_token_walk;
#[doc(hidden)]
pub use m2_syn_macros::__syntax_walk_function;
#[doc(hidden)]
pub use m2_syn_macros::token as __m2_syn_token;
pub use m2_syn_macros::{Spanned, parse_quote_m2, quote_m2};
pub use native::{
    CompletedNativeCell, NativeCellParser, NativeCellState, NativeParseError, NativeParser,
    parse_native, parse_native_recovering,
};
pub(crate) use nodes::*;
pub use nodes::{fold, visit, visit_mut};
pub use parsed_file::ParsedFile;
pub use pretty::{
    PrettyDetail, PrettyDetailRole, PrettyEdge, PrettyNode, PrettyNodeRole, PrettyOptions,
    PrettyReport, PrettyTree, format_pretty_cell_tokens, format_pretty_tokens, format_pretty_tree,
};
pub use punctuated::{Punctuated, SeparatedPair};
pub use realtime::{
    NativeCellBoundary, NativeRealtimeCell, NativeRealtimeEditError, NativeRealtimeParser,
};
pub use recovery::Recovered;
pub use span::{
    File, LineColumn, LineColumnRange, Offset, Source, SourceId, Span, Spanned, TextEdit,
};
pub use these_macros_should_be_illegal::qf;
#[doc(hidden)]
pub use token_stream::delim::parse_delimiter;
pub use token_stream::delim::{
    Delimiter, DelimiterKind, DelimiterToken, DelimiterValue, DoubleSpan,
};
pub use token_stream::{
    CommentTrivia, IdentToken, LeadingTrivia, Lex, LiteralKind, LiteralToken, Punct, Terminal,
    TokenGroup, TokenStream, TokenTree, TrailingTrivia, Trivia, TriviaKind,
};