Skip to main content

Crate orrery_parser

Crate orrery_parser 

Source
Expand description

§Orrery Parser

Parser for the Orrery diagram language. This crate provides the parsing pipeline from source text to semantic diagram representation.

§Usage

let arena = Bump::new();
let source = r#"
    diagram component;
    user: Rectangle;
    server: Rectangle;
    user -> server: "Request";
"#;

let mut provider = InMemorySourceProvider::new();
provider.add_file("main.orr", source);

let diagram = parse(&arena, Path::new("main.orr"), provider, ElaborateConfig::default())
    .map_err(|e| e.to_string())?;

Re-exports§

pub use source_provider::InMemorySourceProvider;
pub use source_provider::SourceProvider;

Modules§

error
Error and diagnostic system for the Orrery parser.
source_map
Source map for multi-file span tracking.
source_provider
Source provider abstraction for file I/O.

Structs§

ElaborateConfig
Configuration for the elaboration phase.
Span
A byte range representing a location in source text.

Functions§

parse
Parse an Orrery file into a semantic diagram.