sway_ast::keywords

Trait Token

source
pub trait Token: Spanned + Sized {
    const PUNCT_KINDS: &'static [PunctKind];
    const NOT_FOLLOWED_BY: &'static [PunctKind];

    // Required methods
    fn new(span: Span) -> Self;
    fn ident(&self) -> Ident;
}
Expand description

The type is a token.

Required Associated Constants§

source

const PUNCT_KINDS: &'static [PunctKind]

The sequence of punctuations that make up the token.

source

const NOT_FOLLOWED_BY: &'static [PunctKind]

Punctuations that will not follow the token.

Required Methods§

source

fn new(span: Span) -> Self

Creates the token from the given span.

source

fn ident(&self) -> Ident

Returns an identifier for this token.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Token for AddEqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for AddToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for AmpersandToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for BangEqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for BangToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for CaretToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for CloseAngleBracketToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for ColonToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for CommaToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for DivEqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for DotToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for DoubleAmpersandToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for DoubleColonToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for DoubleDotToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for DoubleEqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for DoublePipeToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for DoubleStarToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for EqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for FatRightArrowToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for ForwardSlashToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for GreaterThanEqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for GreaterThanToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for HashBangToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for HashToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for LessThanEqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for LessThanToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for OpenAngleBracketToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for PercentToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for PipeToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for RightArrowToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for SemicolonToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for ShlEqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for ShlToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for ShrEqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for ShrToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for StarEqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for StarToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for SubEqToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for SubToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _

source§

impl Token for UnderscoreToken

source§

const PUNCT_KINDS: &'static [PunctKind] = _

source§

const NOT_FOLLOWED_BY: &'static [PunctKind] = _