omena-parser 0.3.0

Green-field cstree parser substrate for the Omena CSS parser stack
Documentation
// @generated by scripts/generate-engine-v2-contract-idl.ts from contracts/parse-tree/main.tsp.
// Do not edit this file by hand.

//! Rust projection of the parse-tree contract IDL used by parser boundaries.

#![allow(dead_code)]

use crate::{ParserByteSpanV0, ParserRangeV0};
use serde::Serialize;

#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
#[serde(rename_all = "camelCase")]
/// Recursive parse-tree node projected from the parse-tree contract IDL.
pub struct ParseTreeNodeV0 {
    pub kind: String,
    pub byte_span: ParserByteSpanV0,
    pub range: ParserRangeV0,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub bogus: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    pub children: Vec<ParseTreeNodeV0>,
}