oak_core/lib.rs
1#![doc = include_str!("readme.md")]
2#![allow(incomplete_features)]
3#![feature(lazy_type_alias)]
4#![feature(new_range_api)]
5#![warn(missing_docs)]
6#![doc(html_logo_url = "https://raw.githubusercontent.com/ygg-lang/oaks/refs/heads/dev/documents/logo.svg")]
7#![doc(html_favicon_url = "https://raw.githubusercontent.com/ygg-lang/oaks/refs/heads/dev/documents/logo.svg")]
8
9/// Tree building and construction utilities for the Oak parsing framework.
10///
11/// This module provides the [`Builder`] trait and related utilities for constructing
12/// kind trees from parsed tokens. It includes incremental building capabilities
13/// and tree manipulation utilities for efficient parsing operations.
14pub mod builder;
15/// Error handling and diagnostic reporting for the parsing system.
16pub mod errors;
17/// Utility functions and helper types for parsing operations.
18pub mod helpers;
19/// Syntax kind definitions for tokens and nodes in the parsing system.
20pub mod kinds;
21/// Language definition trait for coordinating language-specific components.
22pub mod language;
23/// Lexical analysis and tokenization functionality.
24pub mod lexer;
25/// Parsing functionality for converting tokens to kind trees.
26pub mod parser;
27/// Source text management and location tracking.
28pub mod source;
29/// Tree structures for representing kind trees (green and red trees).
30pub mod tree;
31/// Tree traversal utilities for visiting and transforming kind trees.
32///
33/// This module provides visitor patterns and traversal utilities for walking
34/// through kind trees, enabling operations like kind highlighting,
35/// code analysis, and tree transformations.
36pub mod visitor;
37
38pub use crate::{
39    builder::Builder,
40    errors::{LexResult, OakDiagnostics, OakError, OakErrorKind, ParseResult},
41    kinds::SyntaxKind,
42    language::Language,
43    lexer::{Lexer, LexerState, Token},
44    parser::{Associativity, OperatorInfo, Parser, PrattParser, Precedence},
45    source::{SourceLocation, SourceText},
46    tree::*,
47};