pub struct D2Language {}Expand description
Implementation of the D2 language for the Oak framework.
Implementations§
Source§impl D2Language
impl D2Language
Trait Implementations§
Source§impl<'config> Builder<D2Language> for D2Builder<'config>
impl<'config> Builder<D2Language> for D2Builder<'config>
Source§fn build<'a, S: Source + ?Sized>(
&self,
source: &S,
edits: &[TextEdit],
_cache: &'a mut impl BuilderCache<D2Language>,
) -> BuildOutput<D2Language>
fn build<'a, S: Source + ?Sized>( &self, source: &S, edits: &[TextEdit], _cache: &'a mut impl BuilderCache<D2Language>, ) -> BuildOutput<D2Language>
Builds the D2 AST from the green tree.
Source§impl Clone for D2Language
impl Clone for D2Language
Source§fn clone(&self) -> D2Language
fn clone(&self) -> D2Language
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for D2Language
impl Debug for D2Language
Source§impl Default for D2Language
impl Default for D2Language
Source§fn default() -> D2Language
fn default() -> D2Language
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for D2Language
impl<'de> Deserialize<'de> for D2Language
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Language for D2Language
impl Language for D2Language
Source§const CATEGORY: LanguageCategory = LanguageCategory::Modeling
const CATEGORY: LanguageCategory = LanguageCategory::Modeling
The category of the language.
Source§type TokenType = D2TokenType
type TokenType = D2TokenType
The token type used to represent different token and node types in the language. Read more
Source§type ElementType = D2ElementType
type ElementType = D2ElementType
The element type used to represent composite structures in the parsed tree. Read more
Source§impl<'config> Lexer<D2Language> for D2Lexer<'config>
impl<'config> Lexer<D2Language> for D2Lexer<'config>
Source§fn lex<'a, S: Source + ?Sized>(
&self,
source: &S,
_edits: &[TextEdit],
cache: &'a mut impl LexerCache<D2Language>,
) -> LexOutput<D2Language>
fn lex<'a, S: Source + ?Sized>( &self, source: &S, _edits: &[TextEdit], cache: &'a mut impl LexerCache<D2Language>, ) -> LexOutput<D2Language>
Tokenizes the source text into a sequence of tokens. Read more
Source§impl<'config> Parser<D2Language> for D2Parser<'config>
impl<'config> Parser<D2Language> for D2Parser<'config>
Source§fn parse<'a, S: Source + ?Sized>(
&self,
text: &'a S,
edits: &[TextEdit],
cache: &'a mut impl ParseCache<D2Language>,
) -> ParseOutput<'a, D2Language>
fn parse<'a, S: Source + ?Sized>( &self, text: &'a S, edits: &[TextEdit], cache: &'a mut impl ParseCache<D2Language>, ) -> ParseOutput<'a, D2Language>
The core parsing entry point for converting tokens into a syntax tree. Read more
Source§impl Serialize for D2Language
impl Serialize for D2Language
impl Copy for D2Language
Auto Trait Implementations§
impl Freeze for D2Language
impl RefUnwindSafe for D2Language
impl Send for D2Language
impl Sync for D2Language
impl Unpin for D2Language
impl UnsafeUnpin for D2Language
impl UnwindSafe for D2Language
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more