use crate::document::NodeId;
use crate::path::PathSegment;
use crate::prelude_internal::*;
use crate::source::Comment;
pub trait InterpreterSink {
type Error;
type Scope;
fn begin_scope(&mut self) -> Self::Scope;
fn end_scope(&mut self, scope: Self::Scope) -> Result<(), Self::Error>;
fn navigate(&mut self, segment: PathSegment) -> Result<NodeId, Self::Error>;
fn require_hole(&self) -> Result<(), Self::Error>;
fn bind_primitive(&mut self, value: PrimitiveValue) -> Result<(), Self::Error>;
fn bind_hole(&mut self, label: Option<Identifier>) -> Result<(), Self::Error>;
fn bind_empty_map(&mut self) -> Result<(), Self::Error>;
fn bind_empty_array(&mut self) -> Result<(), Self::Error>;
fn bind_empty_tuple(&mut self) -> Result<(), Self::Error>;
fn bind_from(&mut self, value: impl Into<PrimitiveValue>) -> Result<(), Self::Error> {
self.bind_primitive(value.into())
}
fn current_node_id(&self) -> NodeId;
fn current_path(&self) -> &[PathSegment];
fn document(&self) -> &EureDocument;
fn document_mut(&mut self) -> &mut EureDocument;
fn begin_eure_block(&mut self) {}
fn set_block_value(&mut self) -> Result<(), Self::Error> {
Ok(())
}
fn end_eure_block(&mut self) -> Result<(), Self::Error> {
Ok(())
}
fn begin_binding(&mut self) {}
fn end_binding_value(&mut self) -> Result<(), Self::Error> {
Ok(())
}
fn end_binding_block(&mut self) -> Result<(), Self::Error> {
Ok(())
}
fn begin_section(&mut self) {}
fn begin_section_items(&mut self) {}
fn end_section_items(&mut self) -> Result<(), Self::Error> {
Ok(())
}
fn end_section_block(&mut self) -> Result<(), Self::Error> {
Ok(())
}
fn comment(&mut self, _comment: Comment) {}
fn blank_line(&mut self) {}
}