Skip to main content

oxirs_arq/query/
queryparser_type.rs

1//! Auto-generated module
2//!
3//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
4
5use crate::algebra::Variable;
6use std::collections::{HashMap, HashSet};
7
8use super::types::Token;
9
10/// Query parser implementation
11pub struct QueryParser {
12    pub(super) tokens: Vec<Token>,
13    pub(super) position: usize,
14    pub(super) prefixes: HashMap<String, String>,
15    pub(super) base_iri: Option<String>,
16    pub(super) variables: HashSet<Variable>,
17    /// Monotonic counter minting unique labels for the anonymous blank nodes of
18    /// `[ … ]` blank-node property lists and `( … )` RDF collections.
19    pub(super) blank_node_counter: usize,
20    /// Whether the parser is currently reading a CONSTRUCT template (as opposed
21    /// to a WHERE graph pattern). It flips how anonymous blank nodes are lowered:
22    /// a template mints real `Term::BlankNode`s (`instantiate_construct` then
23    /// mints a fresh one per solution row), while a WHERE pattern mints fresh
24    /// non-distinguished `Term::Variable`s (the store matches a query blank node
25    /// as an existential variable, never as a specific stored blank node).
26    pub(super) in_construct_template: bool,
27}