Trait cairo_lang_syntax::node::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 Types§

Required Associated Constants§

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).

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Terminal for TerminalAnd

source§

const KIND: SyntaxKind = SyntaxKind::TerminalAnd

§

type TokenType = TokenAnd

source§

impl Terminal for TerminalAndAnd

source§

const KIND: SyntaxKind = SyntaxKind::TerminalAndAnd

§

type TokenType = TokenAndAnd

source§

impl Terminal for TerminalArrow

source§

const KIND: SyntaxKind = SyntaxKind::TerminalArrow

§

type TokenType = TokenArrow

source§

impl Terminal for TerminalAs

source§

const KIND: SyntaxKind = SyntaxKind::TerminalAs

§

type TokenType = TokenAs

source§

impl Terminal for TerminalAt

source§

const KIND: SyntaxKind = SyntaxKind::TerminalAt

§

type TokenType = TokenAt

source§

impl Terminal for TerminalBadCharacters

source§

const KIND: SyntaxKind = SyntaxKind::TerminalBadCharacters

§

type TokenType = TokenBadCharacters

source§

impl Terminal for TerminalBitNot

source§

const KIND: SyntaxKind = SyntaxKind::TerminalBitNot

§

type TokenType = TokenBitNot

source§

impl Terminal for TerminalBreak

source§

const KIND: SyntaxKind = SyntaxKind::TerminalBreak

§

type TokenType = TokenBreak

source§

impl Terminal for TerminalColon

source§

const KIND: SyntaxKind = SyntaxKind::TerminalColon

§

type TokenType = TokenColon

source§

impl Terminal for TerminalColonColon

source§

const KIND: SyntaxKind = SyntaxKind::TerminalColonColon

§

type TokenType = TokenColonColon

source§

impl Terminal for TerminalComma

source§

const KIND: SyntaxKind = SyntaxKind::TerminalComma

§

type TokenType = TokenComma

source§

impl Terminal for TerminalConst

source§

const KIND: SyntaxKind = SyntaxKind::TerminalConst

§

type TokenType = TokenConst

source§

impl Terminal for TerminalContinue

source§

const KIND: SyntaxKind = SyntaxKind::TerminalContinue

§

type TokenType = TokenContinue

source§

impl Terminal for TerminalDiv

source§

const KIND: SyntaxKind = SyntaxKind::TerminalDiv

§

type TokenType = TokenDiv

source§

impl Terminal for TerminalDivEq

source§

const KIND: SyntaxKind = SyntaxKind::TerminalDivEq

§

type TokenType = TokenDivEq

source§

impl Terminal for TerminalDot

source§

const KIND: SyntaxKind = SyntaxKind::TerminalDot

§

type TokenType = TokenDot

source§

impl Terminal for TerminalDotDot

source§

const KIND: SyntaxKind = SyntaxKind::TerminalDotDot

§

type TokenType = TokenDotDot

source§

impl Terminal for TerminalElse

source§

const KIND: SyntaxKind = SyntaxKind::TerminalElse

§

type TokenType = TokenElse

source§

impl Terminal for TerminalEndOfFile

source§

const KIND: SyntaxKind = SyntaxKind::TerminalEndOfFile

§

type TokenType = TokenEndOfFile

source§

impl Terminal for TerminalEnum

source§

const KIND: SyntaxKind = SyntaxKind::TerminalEnum

§

type TokenType = TokenEnum

source§

impl Terminal for TerminalEq

source§

const KIND: SyntaxKind = SyntaxKind::TerminalEq

§

type TokenType = TokenEq

source§

impl Terminal for TerminalEqEq

source§

const KIND: SyntaxKind = SyntaxKind::TerminalEqEq

§

type TokenType = TokenEqEq

source§

impl Terminal for TerminalExtern

source§

const KIND: SyntaxKind = SyntaxKind::TerminalExtern

§

type TokenType = TokenExtern

source§

impl Terminal for TerminalFalse

source§

const KIND: SyntaxKind = SyntaxKind::TerminalFalse

§

type TokenType = TokenFalse

source§

impl Terminal for TerminalFor

source§

const KIND: SyntaxKind = SyntaxKind::TerminalFor

§

type TokenType = TokenFor

source§

impl Terminal for TerminalFunction

source§

const KIND: SyntaxKind = SyntaxKind::TerminalFunction

§

type TokenType = TokenFunction

source§

impl Terminal for TerminalGE

source§

const KIND: SyntaxKind = SyntaxKind::TerminalGE

§

type TokenType = TokenGE

source§

impl Terminal for TerminalGT

source§

const KIND: SyntaxKind = SyntaxKind::TerminalGT

§

type TokenType = TokenGT

source§

impl Terminal for TerminalHash

source§

const KIND: SyntaxKind = SyntaxKind::TerminalHash

§

type TokenType = TokenHash

source§

impl Terminal for TerminalIdentifier

source§

const KIND: SyntaxKind = SyntaxKind::TerminalIdentifier

§

type TokenType = TokenIdentifier

source§

impl Terminal for TerminalIf

source§

const KIND: SyntaxKind = SyntaxKind::TerminalIf

§

type TokenType = TokenIf

source§

impl Terminal for TerminalImpl

source§

const KIND: SyntaxKind = SyntaxKind::TerminalImpl

§

type TokenType = TokenImpl

source§

impl Terminal for TerminalImplicits

source§

const KIND: SyntaxKind = SyntaxKind::TerminalImplicits

§

type TokenType = TokenImplicits

source§

impl Terminal for TerminalLBrace

source§

const KIND: SyntaxKind = SyntaxKind::TerminalLBrace

§

type TokenType = TokenLBrace

source§

impl Terminal for TerminalLBrack

source§

const KIND: SyntaxKind = SyntaxKind::TerminalLBrack

§

type TokenType = TokenLBrack

source§

impl Terminal for TerminalLE

source§

const KIND: SyntaxKind = SyntaxKind::TerminalLE

§

type TokenType = TokenLE

source§

impl Terminal for TerminalLParen

source§

const KIND: SyntaxKind = SyntaxKind::TerminalLParen

§

type TokenType = TokenLParen

source§

impl Terminal for TerminalLT

source§

const KIND: SyntaxKind = SyntaxKind::TerminalLT

§

type TokenType = TokenLT

source§

impl Terminal for TerminalLet

source§

const KIND: SyntaxKind = SyntaxKind::TerminalLet

§

type TokenType = TokenLet

source§

impl Terminal for TerminalLiteralNumber

source§

const KIND: SyntaxKind = SyntaxKind::TerminalLiteralNumber

§

type TokenType = TokenLiteralNumber

source§

impl Terminal for TerminalLoop

source§

const KIND: SyntaxKind = SyntaxKind::TerminalLoop

§

type TokenType = TokenLoop

source§

impl Terminal for TerminalMatch

source§

const KIND: SyntaxKind = SyntaxKind::TerminalMatch

§

type TokenType = TokenMatch

source§

impl Terminal for TerminalMatchArrow

source§

const KIND: SyntaxKind = SyntaxKind::TerminalMatchArrow

§

type TokenType = TokenMatchArrow

source§

impl Terminal for TerminalMinus

source§

const KIND: SyntaxKind = SyntaxKind::TerminalMinus

§

type TokenType = TokenMinus

source§

impl Terminal for TerminalMinusEq

source§

const KIND: SyntaxKind = SyntaxKind::TerminalMinusEq

§

type TokenType = TokenMinusEq

source§

impl Terminal for TerminalMod

source§

const KIND: SyntaxKind = SyntaxKind::TerminalMod

§

type TokenType = TokenMod

source§

impl Terminal for TerminalModEq

source§

const KIND: SyntaxKind = SyntaxKind::TerminalModEq

§

type TokenType = TokenModEq

source§

impl Terminal for TerminalModule

source§

const KIND: SyntaxKind = SyntaxKind::TerminalModule

§

type TokenType = TokenModule

source§

impl Terminal for TerminalMul

source§

const KIND: SyntaxKind = SyntaxKind::TerminalMul

§

type TokenType = TokenMul

source§

impl Terminal for TerminalMulEq

source§

const KIND: SyntaxKind = SyntaxKind::TerminalMulEq

§

type TokenType = TokenMulEq

source§

impl Terminal for TerminalMut

source§

const KIND: SyntaxKind = SyntaxKind::TerminalMut

§

type TokenType = TokenMut

source§

impl Terminal for TerminalNeq

source§

const KIND: SyntaxKind = SyntaxKind::TerminalNeq

§

type TokenType = TokenNeq

source§

impl Terminal for TerminalNoPanic

source§

const KIND: SyntaxKind = SyntaxKind::TerminalNoPanic

§

type TokenType = TokenNoPanic

source§

impl Terminal for TerminalNot

source§

const KIND: SyntaxKind = SyntaxKind::TerminalNot

§

type TokenType = TokenNot

source§

impl Terminal for TerminalOf

source§

const KIND: SyntaxKind = SyntaxKind::TerminalOf

§

type TokenType = TokenOf

source§

impl Terminal for TerminalOr

source§

const KIND: SyntaxKind = SyntaxKind::TerminalOr

§

type TokenType = TokenOr

source§

impl Terminal for TerminalOrOr

source§

const KIND: SyntaxKind = SyntaxKind::TerminalOrOr

§

type TokenType = TokenOrOr

source§

impl Terminal for TerminalPlus

source§

const KIND: SyntaxKind = SyntaxKind::TerminalPlus

§

type TokenType = TokenPlus

source§

impl Terminal for TerminalPlusEq

source§

const KIND: SyntaxKind = SyntaxKind::TerminalPlusEq

§

type TokenType = TokenPlusEq

source§

impl Terminal for TerminalPub

source§

const KIND: SyntaxKind = SyntaxKind::TerminalPub

§

type TokenType = TokenPub

source§

impl Terminal for TerminalQuestionMark

source§

const KIND: SyntaxKind = SyntaxKind::TerminalQuestionMark

§

type TokenType = TokenQuestionMark

source§

impl Terminal for TerminalRBrace

source§

const KIND: SyntaxKind = SyntaxKind::TerminalRBrace

§

type TokenType = TokenRBrace

source§

impl Terminal for TerminalRBrack

source§

const KIND: SyntaxKind = SyntaxKind::TerminalRBrack

§

type TokenType = TokenRBrack

source§

impl Terminal for TerminalRParen

source§

const KIND: SyntaxKind = SyntaxKind::TerminalRParen

§

type TokenType = TokenRParen

source§

impl Terminal for TerminalRef

source§

const KIND: SyntaxKind = SyntaxKind::TerminalRef

§

type TokenType = TokenRef

source§

impl Terminal for TerminalReturn

source§

const KIND: SyntaxKind = SyntaxKind::TerminalReturn

§

type TokenType = TokenReturn

source§

impl Terminal for TerminalSemicolon

source§

const KIND: SyntaxKind = SyntaxKind::TerminalSemicolon

§

type TokenType = TokenSemicolon

source§

impl Terminal for TerminalShortString

source§

const KIND: SyntaxKind = SyntaxKind::TerminalShortString

§

type TokenType = TokenShortString

source§

impl Terminal for TerminalString

source§

const KIND: SyntaxKind = SyntaxKind::TerminalString

§

type TokenType = TokenString

source§

impl Terminal for TerminalStruct

source§

const KIND: SyntaxKind = SyntaxKind::TerminalStruct

§

type TokenType = TokenStruct

source§

impl Terminal for TerminalTrait

source§

const KIND: SyntaxKind = SyntaxKind::TerminalTrait

§

type TokenType = TokenTrait

source§

impl Terminal for TerminalTrue

source§

const KIND: SyntaxKind = SyntaxKind::TerminalTrue

§

type TokenType = TokenTrue

source§

impl Terminal for TerminalType

source§

const KIND: SyntaxKind = SyntaxKind::TerminalType

§

type TokenType = TokenType

source§

impl Terminal for TerminalUnderscore

source§

const KIND: SyntaxKind = SyntaxKind::TerminalUnderscore

§

type TokenType = TokenUnderscore

source§

impl Terminal for TerminalUse

source§

const KIND: SyntaxKind = SyntaxKind::TerminalUse

§

type TokenType = TokenUse

source§

impl Terminal for TerminalWhile

source§

const KIND: SyntaxKind = SyntaxKind::TerminalWhile

§

type TokenType = TokenWhile

source§

impl Terminal for TerminalXor

source§

const KIND: SyntaxKind = SyntaxKind::TerminalXor

§

type TokenType = TokenXor