Skip to main content

nightjar_lang/
lib.rs

1// Copyright 2026 Wayne Hong (h-alice) <contact@halice.art>
2// Nightjar Language Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//     http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16// Crate root. Re-exports the Phase 1 (parser) and Phase 2 (executor/runtime)
17// public surfaces of the Nightjar verification DSL.
18
19//! Nightjar Language is a declarative, prefix-notation DSL for formal
20//! verification of structured data.
21
22#![warn(missing_docs)]
23
24pub mod context;
25pub mod error;
26pub mod executor;
27pub mod language;
28pub mod symbol_table;
29
30// ─────────────────────────── parser ───────────────────────────
31pub use error::{ErrorCode, NightjarLanguageError, Span};
32pub use language::grammar::{
33    BoolExpr, FuncOp, Keyword, Literal, Predicate, Program, QuantifierOp, Spanned, SpannedBoolExpr,
34    SpannedValueExpr, UnaryCheckOp, ValueExpr, VerifierOp,
35};
36pub use language::parser::{parse, parse_with_config, ParserConfig};
37
38// ───────────────────── runtime & executor ──────────────────────
39pub use context::entity::{Entity, TypeTag};
40pub use executor::{exec_entity, ExecOptions, ExecResult};
41pub use symbol_table::SymbolTable;
42
43#[cfg(feature = "json")]
44pub use executor::exec;