Module token_macros

Source
Expand description

Various macros that expand to AST nodes that wrap Tokens.

Modules§

delim
Various T!s representing a tokens with Kind::Delim, but each represents a discrete character.
dimension
Dimension specific T!s. These are all Kind::Dimension, but each represents a discrete dimension unit.
double
Various T!s representing two consecutive tokens that cannot be separated by any other tokens. These are convenient as it can be tricky to parse two consecutive tokens given the default behaviour of the parser is to skip whitespace and comments.

Structs§

Any
Represents any possible single token. Use T![Any] to refer to this.
AtKeyword
Represents a token with Kind::AtKeyword. Use T![AtKeyword] to refer to this.
BadString
Represents a token with Kind::BadString. Use T![BadString] to refer to this.
BadUrl
Represents a token with Kind::BadUrl. Use T![BadUrl] to refer to this.[
CdcOrCdo
Represents a token with Kind::CdcOrCdo. Use T![CdcOrCdo] to refer to this.
Colon
Represents a token with Kind::Colon - a : character. Use T![:] to refer to this.
Comma
Represents a token with Kind::Comma - a , character. Use T![,] to refer to this.
Comment
Represents a token with Kind::Comment. Use T![Comment] to refer to this.
DashedIdent
Represents a token with Kind::Ident that also begins with two HYPHEN MINUS (--) characters. Use T![DashedIdent] to refer to this.
Delim
Represents a token with Kind::Delim, can be any single character. Use T![Delim] to refer to this.
Dimension
Represents a token with Kind::Dimension. Use T![Dimension] to refer to this.
DimensionIdent
Eof
Represents a token with Kind::Eof. Use T![Eof] to refer to this.
Function
Represents a token with Kind::Function. Use T![Function] to refer to this.
Hash
Represents a token with Kind::Hash. Use T![Hash] to refer to this.
Ident
Represents a token with Kind::Ident. Use T![Ident] to refer to this.
LeftCurly
Represents a token with Kind::LeftCurly - a { character. Use T![‘{’] to refer to this.
LeftParen
Represents a token with Kind::LeftParen - a ( character. Use T![‘(’] to refer to this.
LeftSquare
Represents a token with Kind::LeftSquare - a [ character. Use [T![‘[’]][crate::T] to refer to this.
Number
Represents a token with Kind::Number. Use T![Number] to refer to this.
PairWiseEnd
Represents a token with either Kind::RightCurly, Kind::RightParen or Kind::RightSquare. Use T![PairWiseEnd] to refer to this.
PairWiseStart
Represents a token with either Kind::LeftCurly, Kind::LeftParen or Kind::LeftSquare. Use T![PairWiseStart] to refer to this.
RightCurly
Represents a token with Kind::LeftCurly - a } character. Use T![‘}’] to refer to this.
RightParen
Represents a token with Kind::RightParen - a ( character. Use T![‘)’] to refer to this.
RightSquare
Represents a token with Kind::RightSquare - a ] character. Use [T![‘]’]]crate::T to refer to this.
Semicolon
Represents a token with Kind::Semicolon - a ; character. Use T![;] to refer to this.
String
Represents a token with Kind::String. Use T![String] to refer to this.
Url
Represents a token with Kind::Url. Use T![Url] to refer to this.
Whitespace
Represents a token with Kind::Whitespace. Use T![Whitespace] to refer to this.