#![doc = include_str!("README.md")]
use super::types::{
PROJECTION_LIMIT, ProjectionStanding, RecipeCodec, RecipeError, RecipeIssue, RecipeParts,
RecipeRelationParts, RecipeVocabularyParts,
};
use super::{
EVIDENCE_LIMIT, EffectiveProjection, EvidenceTarget, HarnessPosture, LoweringSource,
RELATION_TABLE_LIMIT, Recipe, RecipeEvidence, RecipeMember, RecipeRelationRequirements,
RecipeRelationRow, RecipeRole, RelationTableProjection,
};
use crate::support::SupportName;
use crate::token::{
AuthoredItemKind, CapturedDelimiter, CapturedInput, CapturedTokenTree, preserved_tree,
};
mod bake;
mod codec;
mod dispatch;
mod evidence;
mod module;
mod projection;
mod read;
mod relation;
use read::{fragment_refusal, grammar, identifier_token};
const BAKE: &str = "bake";
struct BakeRead {
vocabularies: Vec<CapturedName>,
relations: Vec<CapturedRelation>,
transition_relation: Option<String>,
codecs: Vec<RecipeCodec>,
projections: [ProjectionStanding; PROJECTION_LIMIT],
evidence: [Option<RecipeEvidence>; EVIDENCE_LIMIT],
support: Option<SupportName>,
}
#[derive(Clone)]
struct CapturedRelation {
name: CapturedName,
left: CapturedName,
right: CapturedName,
rows: Vec<RecipeRelationRow>,
requirements: RecipeRelationRequirements,
}
#[derive(Clone)]
struct CapturedName {
spelling: String,
token: crate::token::GeneratedToken,
at: crate::token::SpanHandle,
}
#[derive(Clone)]
struct RequestedProjection {
role: RecipeRole,
name: Option<String>,
subject: Option<String>,
source: LoweringSource,
exact: Option<CapturedInput>,
dispatch_bindings: Option<[String; 2]>,
relation_tables: Option<Vec<RequestedRelationTable>>,
at: crate::token::SpanHandle,
}
#[derive(Clone)]
struct RequestedRelationTable {
relation: String,
function: Option<String>,
source: LoweringSource,
exact: Option<CapturedInput>,
at: crate::token::SpanHandle,
}
#[derive(Clone)]
struct RequestedEvidence {
role: RecipeRole,
target: Option<String>,
body: Option<CapturedInput>,
at: crate::token::SpanHandle,
}