blue-lang-syntax 0.0.100

blue's surface syntax: lexer, parser, and lowering to the tatara-lisp quoted form.
Documentation
//! blue's surface syntax.
//!
//! Blue is a general-purpose language whose surface is Ruby/Elixir-shaped
//! and whose **program is a tatara-lisp value**. This crate is the join:
//! it lexes blue source and parses it directly into `tatara_lisp::Sexp`.
//!
//! There is deliberately no private blue AST in between. Tenet 1 of
//! `theory/BLUE.md` is that blue source parses *to tatara-lisp*, and an
//! intermediate tree would make homoiconicity a conversion step rather
//! than an identity — the difference between blue's macro story working
//! and merely being asserted.
//!
//! ```
//! use blue_lang_syntax::parse_expr;
//! let form = parse_expr("user.greet(1)").unwrap();
//! assert_eq!(form.to_string(), "(greet user 1)");
//! ```

pub mod forms;
pub mod kigou;
pub mod lex;
pub mod parse;
pub mod scope;
pub mod spelling;
pub mod yakugo;

pub use forms::{Form, FORMS};
pub use lex::{lex, LexError, Span, Token, TokenKind};
// Re-exported so a consumer walking blue trees does not have to depend on
// tatara-lisp directly just to name the node types blue emits.
pub use parse::{
    comments, is_callable_name, is_reserved_word, keyword_doc, parse_expr, parse_program,
    parse_program_in, parse_program_spanned, parse_program_spanned_with_depth, parse_program_tree,
    parse_program_tree_in, parse_program_tree_with_depth, parse_program_with_depth,
    parses_on_this_thread, qualified, qualify, spelling_notes, Comment, Infix, ParseError,
    BLOCK_KEYWORDS, BUILTIN_QUALIFIER, INFIX, LOWERED_ASSERT, LOWERED_ATTEMPTED, LOWERED_CONCAT,
    LOWERED_ENSURE, LOWERED_ERROR_MATCH, LOWERED_FAILED, LOWERED_FIELD, LOWERED_HEADS,
    LOWERED_KWARGS, LOWERED_MAP, LOWERED_MERGE, LOWERED_OPTIONAL_ARG, LOWERED_OPTIONAL_ARITY,
    LOWERED_RERAISE, LOWERED_SPLICE, MASTER_VERBS, MAX_EXPR_DEPTH, OPERATOR_KEYWORDS,
    OPTIONAL_MARKER, QUALIFIER, RESCUED, SURFACE_KEYWORDS, SYMBOL_SPELLINGS,
};
pub use spelling::{Note, Spelling};
// `Spanned`/`SpannedForm` alongside `Sexp` for the same reason `Sexp` is here:
// the parser's real output is the spanned tree, and a consumer that wants a
// position should not have to add a tatara-lisp dependency to name the node it
// got a span from.
pub use tatara_lisp::{Atom, Sexp, Spanned, SpannedForm};