cairo_lang_syntax::node

Trait Terminal

Source
pub trait Terminal: TypedSyntaxNode {
    type TokenType: Token;

    const KIND: SyntaxKind;

    // Required methods
    fn new_green(
        db: &dyn SyntaxGroup,
        leading_trivia: TriviaGreen,
        token: <<Self as Terminal>::TokenType as TypedSyntaxNode>::Green,
        trailing_trivia: TriviaGreen,
    ) -> <Self as TypedSyntaxNode>::Green;
    fn text(&self, db: &dyn SyntaxGroup) -> SmolStr;
}

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

fn new_green( db: &dyn SyntaxGroup, leading_trivia: TriviaGreen, token: <<Self as Terminal>::TokenType as TypedSyntaxNode>::Green, trailing_trivia: TriviaGreen, ) -> <Self as TypedSyntaxNode>::Green

Source

fn text(&self, db: &dyn SyntaxGroup) -> SmolStr

Returns the text of the token of this terminal (excluding the trivia).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Terminal for TerminalAnd

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalAnd

Source§

type TokenType = TokenAnd

Source§

impl Terminal for TerminalAndAnd

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalAndAnd

Source§

type TokenType = TokenAndAnd

Source§

impl Terminal for TerminalArrow

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalArrow

Source§

type TokenType = TokenArrow

Source§

impl Terminal for TerminalAs

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalAs

Source§

type TokenType = TokenAs

Source§

impl Terminal for TerminalAt

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalAt

Source§

type TokenType = TokenAt

Source§

impl Terminal for TerminalBadCharacters

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalBadCharacters

Source§

type TokenType = TokenBadCharacters

Source§

impl Terminal for TerminalBitNot

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalBitNot

Source§

type TokenType = TokenBitNot

Source§

impl Terminal for TerminalBreak

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalBreak

Source§

type TokenType = TokenBreak

Source§

impl Terminal for TerminalColon

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalColon

Source§

type TokenType = TokenColon

Source§

impl Terminal for TerminalColonColon

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalColonColon

Source§

type TokenType = TokenColonColon

Source§

impl Terminal for TerminalComma

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalComma

Source§

type TokenType = TokenComma

Source§

impl Terminal for TerminalConst

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalConst

Source§

type TokenType = TokenConst

Source§

impl Terminal for TerminalContinue

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalContinue

Source§

type TokenType = TokenContinue

Source§

impl Terminal for TerminalDiv

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalDiv

Source§

type TokenType = TokenDiv

Source§

impl Terminal for TerminalDivEq

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalDivEq

Source§

type TokenType = TokenDivEq

Source§

impl Terminal for TerminalDot

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalDot

Source§

type TokenType = TokenDot

Source§

impl Terminal for TerminalDotDot

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalDotDot

Source§

type TokenType = TokenDotDot

Source§

impl Terminal for TerminalElse

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalElse

Source§

type TokenType = TokenElse

Source§

impl Terminal for TerminalEmpty

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalEmpty

Source§

type TokenType = TokenEmpty

Source§

impl Terminal for TerminalEndOfFile

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalEndOfFile

Source§

type TokenType = TokenEndOfFile

Source§

impl Terminal for TerminalEnum

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalEnum

Source§

type TokenType = TokenEnum

Source§

impl Terminal for TerminalEq

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalEq

Source§

type TokenType = TokenEq

Source§

impl Terminal for TerminalEqEq

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalEqEq

Source§

type TokenType = TokenEqEq

Source§

impl Terminal for TerminalExtern

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalExtern

Source§

type TokenType = TokenExtern

Source§

impl Terminal for TerminalFalse

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalFalse

Source§

type TokenType = TokenFalse

Source§

impl Terminal for TerminalFor

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalFor

Source§

type TokenType = TokenFor

Source§

impl Terminal for TerminalFunction

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalFunction

Source§

type TokenType = TokenFunction

Source§

impl Terminal for TerminalGE

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalGE

Source§

type TokenType = TokenGE

Source§

impl Terminal for TerminalGT

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalGT

Source§

type TokenType = TokenGT

Source§

impl Terminal for TerminalHash

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalHash

Source§

type TokenType = TokenHash

Source§

impl Terminal for TerminalIdentifier

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalIdentifier

Source§

type TokenType = TokenIdentifier

Source§

impl Terminal for TerminalIf

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalIf

Source§

type TokenType = TokenIf

Source§

impl Terminal for TerminalImpl

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalImpl

Source§

type TokenType = TokenImpl

Source§

impl Terminal for TerminalImplicits

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalImplicits

Source§

type TokenType = TokenImplicits

Source§

impl Terminal for TerminalLBrace

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalLBrace

Source§

type TokenType = TokenLBrace

Source§

impl Terminal for TerminalLBrack

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalLBrack

Source§

type TokenType = TokenLBrack

Source§

impl Terminal for TerminalLE

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalLE

Source§

type TokenType = TokenLE

Source§

impl Terminal for TerminalLParen

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalLParen

Source§

type TokenType = TokenLParen

Source§

impl Terminal for TerminalLT

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalLT

Source§

type TokenType = TokenLT

Source§

impl Terminal for TerminalLet

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalLet

Source§

type TokenType = TokenLet

Source§

impl Terminal for TerminalLiteralNumber

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalLiteralNumber

Source§

type TokenType = TokenLiteralNumber

Source§

impl Terminal for TerminalLoop

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalLoop

Source§

type TokenType = TokenLoop

Source§

impl Terminal for TerminalMatch

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalMatch

Source§

type TokenType = TokenMatch

Source§

impl Terminal for TerminalMatchArrow

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalMatchArrow

Source§

type TokenType = TokenMatchArrow

Source§

impl Terminal for TerminalMinus

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalMinus

Source§

type TokenType = TokenMinus

Source§

impl Terminal for TerminalMinusEq

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalMinusEq

Source§

type TokenType = TokenMinusEq

Source§

impl Terminal for TerminalMod

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalMod

Source§

type TokenType = TokenMod

Source§

impl Terminal for TerminalModEq

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalModEq

Source§

type TokenType = TokenModEq

Source§

impl Terminal for TerminalModule

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalModule

Source§

type TokenType = TokenModule

Source§

impl Terminal for TerminalMul

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalMul

Source§

type TokenType = TokenMul

Source§

impl Terminal for TerminalMulEq

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalMulEq

Source§

type TokenType = TokenMulEq

Source§

impl Terminal for TerminalMut

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalMut

Source§

type TokenType = TokenMut

Source§

impl Terminal for TerminalNeq

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalNeq

Source§

type TokenType = TokenNeq

Source§

impl Terminal for TerminalNoPanic

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalNoPanic

Source§

type TokenType = TokenNoPanic

Source§

impl Terminal for TerminalNot

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalNot

Source§

type TokenType = TokenNot

Source§

impl Terminal for TerminalOf

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalOf

Source§

type TokenType = TokenOf

Source§

impl Terminal for TerminalOr

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalOr

Source§

type TokenType = TokenOr

Source§

impl Terminal for TerminalOrOr

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalOrOr

Source§

type TokenType = TokenOrOr

Source§

impl Terminal for TerminalPlus

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalPlus

Source§

type TokenType = TokenPlus

Source§

impl Terminal for TerminalPlusEq

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalPlusEq

Source§

type TokenType = TokenPlusEq

Source§

impl Terminal for TerminalPub

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalPub

Source§

type TokenType = TokenPub

Source§

impl Terminal for TerminalQuestionMark

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalQuestionMark

Source§

type TokenType = TokenQuestionMark

Source§

impl Terminal for TerminalRBrace

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalRBrace

Source§

type TokenType = TokenRBrace

Source§

impl Terminal for TerminalRBrack

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalRBrack

Source§

type TokenType = TokenRBrack

Source§

impl Terminal for TerminalRParen

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalRParen

Source§

type TokenType = TokenRParen

Source§

impl Terminal for TerminalRef

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalRef

Source§

type TokenType = TokenRef

Source§

impl Terminal for TerminalReturn

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalReturn

Source§

type TokenType = TokenReturn

Source§

impl Terminal for TerminalSemicolon

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalSemicolon

Source§

type TokenType = TokenSemicolon

Source§

impl Terminal for TerminalShortString

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalShortString

Source§

type TokenType = TokenShortString

Source§

impl Terminal for TerminalString

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalString

Source§

type TokenType = TokenString

Source§

impl Terminal for TerminalStruct

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalStruct

Source§

type TokenType = TokenStruct

Source§

impl Terminal for TerminalTrait

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalTrait

Source§

type TokenType = TokenTrait

Source§

impl Terminal for TerminalTrue

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalTrue

Source§

type TokenType = TokenTrue

Source§

impl Terminal for TerminalType

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalType

Source§

type TokenType = TokenType

Source§

impl Terminal for TerminalUnderscore

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalUnderscore

Source§

type TokenType = TokenUnderscore

Source§

impl Terminal for TerminalUse

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalUse

Source§

type TokenType = TokenUse

Source§

impl Terminal for TerminalWhile

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalWhile

Source§

type TokenType = TokenWhile

Source§

impl Terminal for TerminalXor

Source§

const KIND: SyntaxKind = SyntaxKind::TerminalXor

Source§

type TokenType = TokenXor