#[repr(u16)]
pub enum SyntaxKind {
Show 246 variants TK_WHITESPACE, TK_LINE_BREAK, TK_WORD, TK_NUMBER, TK_HTML_ESCAPE_CHARACTER, TK_DOT, TK_DOUBLE_DOT, TK_COMMA, TK_COLON, TK_SEMICOLON, TK_EXCLAMATION_MARK, TK_EXCLAMATION_MARK_EQUALS, TK_EXCLAMATION_MARK_DOUBLE_EQUALS, TK_QUESTION_MARK, TK_DOUBLE_QUESTION_MARK, TK_PERCENT, TK_TILDE, TK_SINGLE_PIPE, TK_DOUBLE_PIPE, TK_AMPERSAND, TK_DOUBLE_AMPERSAND, TK_FORWARD_SLASH, TK_DOUBLE_FORWARD_SLASH, TK_BACKWARD_SLASH, TK_OPEN_PARENTHESIS, TK_CLOSE_PARENTHESIS, TK_OPEN_CURLY, TK_CLOSE_CURLY, TK_OPEN_SQUARE, TK_CLOSE_SQUARE, TK_LESS_THAN, TK_LESS_THAN_EQUAL, TK_LESS_THAN_EQUAL_GREATER_THAN, TK_LESS_THAN_SLASH, TK_LESS_THAN_EXCLAMATION_MARK, TK_DOCTYPE, TK_GREATER_THAN, TK_GREATER_THAN_EQUAL, TK_SLASH_GREATER_THAN, TK_LESS_THAN_EXCLAMATION_MARK_MINUS_MINUS, TK_MINUS_MINUS_GREATER_THAN, TK_EQUAL, TK_DOUBLE_EQUAL, TK_TRIPLE_EQUAL, TK_PLUS, TK_MINUS, TK_STAR, TK_DOUBLE_STAR, TK_DOUBLE_QUOTES, TK_SINGLE_QUOTES, TK_GRAVE_ACCENT_QUOTES, TK_CURLY_PERCENT, TK_PERCENT_CURLY, TK_OPEN_CURLY_CURLY, TK_CLOSE_CURLY_CURLY, TK_OPEN_CURLY_HASHTAG, TK_HASHTAG_CLOSE_CURLY, TK_HASHTAG, TK_TRUE, TK_FALSE, TK_BLOCK, TK_ENDBLOCK, TK_IF, TK_ELSE_IF, TK_ELSE, TK_ENDIF, TK_APPLY, TK_ENDAPPLY, TK_AUTOESCAPE, TK_ENDAUTOESCAPE, TK_CACHE, TK_ENDCACHE, TK_DEPRECATED, TK_DO, TK_EMBED, TK_ENDEMBED, TK_EXTENDS, TK_FLUSH, TK_FOR, TK_ENDFOR, TK_FROM, TK_IMPORT, TK_MACRO, TK_ENDMACRO, TK_SANDBOX, TK_ENDSANDBOX, TK_SET, TK_ENDSET, TK_USE, TK_VERBATIM, TK_ENDVERBATIM, TK_ONLY, TK_IGNORE_MISSING, TK_WITH, TK_ENDWITH, TK_TTL, TK_TAGS, TK_NOT, TK_OR, TK_AND, TK_BINARY_OR, TK_BINARY_XOR, TK_BINARY_AND, TK_IN, TK_MATCHES, TK_STARTS_WITH, TK_ENDS_WITH, TK_IS, TK_EVEN, TK_ODD, TK_DEFINED, TK_SAME_AS, TK_AS, TK_NONE, TK_NULL, TK_DIVISIBLE_BY, TK_CONSTANT, TK_EMPTY, TK_ITERABLE, TK_MAX, TK_MIN, TK_RANGE, TK_CYCLE, TK_RANDOM, TK_DATE, TK_INCLUDE, TK_SOURCE, TK_SW_EXTENDS, TK_SW_SILENT_FEATURE_CALL, TK_ENDSW_SILENT_FEATURE_CALL, TK_SW_INCLUDE, TK_RETURN, TK_SW_ICON, TK_SW_THUMBNAILS, TK_STYLE, TK_LUDTWIG_IGNORE_FILE, TK_LUDTWIG_IGNORE, TK_UNKNOWN, BODY, TWIG_VAR, TWIG_EXPRESSION, TWIG_BINARY_EXPRESSION, TWIG_UNARY_EXPRESSION, TWIG_PARENTHESES_EXPRESSION, TWIG_CONDITIONAL_EXPRESSION, TWIG_OPERAND, TWIG_ACCESSOR, TWIG_FILTER, TWIG_INDEX_LOOKUP, TWIG_INDEX, TWIG_INDEX_RANGE, TWIG_FUNCTION_CALL, TWIG_ARGUMENTS, TWIG_NAMED_ARGUMENT, TWIG_LITERAL_STRING, TWIG_LITERAL_STRING_INNER, TWIG_LITERAL_STRING_INTERPOLATION, TWIG_LITERAL_NUMBER, TWIG_LITERAL_ARRAY, TWIG_LITERAL_ARRAY_INNER, TWIG_LITERAL_NULL, TWIG_LITERAL_BOOLEAN, TWIG_LITERAL_HASH, TWIG_LITERAL_HASH_ITEMS, TWIG_LITERAL_HASH_PAIR, TWIG_LITERAL_HASH_KEY, TWIG_LITERAL_HASH_VALUE, TWIG_LITERAL_NAME, TWIG_COMMENT, TWIG_BLOCK, TWIG_STARTING_BLOCK, TWIG_ENDING_BLOCK, TWIG_IF, TWIG_IF_BLOCK, TWIG_ELSE_IF_BLOCK, TWIG_ELSE_BLOCK, TWIG_ENDIF_BLOCK, TWIG_SET, TWIG_SET_BLOCK, TWIG_ENDSET_BLOCK, TWIG_ASSIGNMENT, TWIG_FOR, TWIG_FOR_BLOCK, TWIG_FOR_ELSE_BLOCK, TWIG_ENDFOR_BLOCK, TWIG_EXTENDS, TWIG_INCLUDE, TWIG_INCLUDE_WITH, TWIG_USE, TWIG_OVERRIDE, TWIG_APPLY, TWIG_APPLY_STARTING_BLOCK, TWIG_APPLY_ENDING_BLOCK, TWIG_AUTOESCAPE, TWIG_AUTOESCAPE_STARTING_BLOCK, TWIG_AUTOESCAPE_ENDING_BLOCK, TWIG_DEPRECATED, TWIG_DO, TWIG_EMBED, TWIG_EMBED_STARTING_BLOCK, TWIG_EMBED_ENDING_BLOCK, TWIG_FLUSH, TWIG_FROM, TWIG_IMPORT, TWIG_SANDBOX, TWIG_SANDBOX_STARTING_BLOCK, TWIG_SANDBOX_ENDING_BLOCK, TWIG_VERBATIM, TWIG_VERBATIM_STARTING_BLOCK, TWIG_VERBATIM_ENDING_BLOCK, TWIG_MACRO, TWIG_MACRO_STARTING_BLOCK, TWIG_MACRO_ENDING_BLOCK, TWIG_WITH, TWIG_WITH_STARTING_BLOCK, TWIG_WITH_ENDING_BLOCK, TWIG_CACHE, TWIG_CACHE_TTL, TWIG_CACHE_TAGS, TWIG_CACHE_STARTING_BLOCK, TWIG_CACHE_ENDING_BLOCK, SHOPWARE_TWIG_SW_EXTENDS, SHOPWARE_TWIG_SW_INCLUDE, SHOPWARE_SILENT_FEATURE_CALL, SHOPWARE_SILENT_FEATURE_CALL_STARTING_BLOCK, SHOPWARE_SILENT_FEATURE_CALL_ENDING_BLOCK, SHOPWARE_RETURN, SHOPWARE_ICON, SHOPWARE_ICON_STYLE, SHOPWARE_THUMBNAILS, SHOPWARE_THUMBNAILS_WITH, HTML_DOCTYPE, HTML_ATTRIBUTE_LIST, HTML_ATTRIBUTE, HTML_STRING, HTML_STRING_INNER, HTML_TEXT, HTML_COMMENT, HTML_TAG, HTML_STARTING_TAG, HTML_ENDING_TAG, LUDTWIG_DIRECTIVE_FILE_IGNORE, LUDTWIG_DIRECTIVE_IGNORE, LUDTWIG_DIRECTIVE_RULE_LIST, ERROR, ROOT,
}

Variants§

§

TK_WHITESPACE

§

TK_LINE_BREAK

§

TK_WORD

a single word containing only characters, numbers or symbols must start with a alpha or one of the special starting characters followed by a normal alpha

§

TK_NUMBER

a valid twig number

§

TK_HTML_ESCAPE_CHARACTER

a html escape character like ‘ ’ or ‘ ’ or ‘ ’

§

TK_DOT

§

TK_DOUBLE_DOT

§

TK_COMMA

§

TK_COLON

§

TK_SEMICOLON

§

TK_EXCLAMATION_MARK

§

TK_EXCLAMATION_MARK_EQUALS

§

TK_EXCLAMATION_MARK_DOUBLE_EQUALS

§

TK_QUESTION_MARK

§

TK_DOUBLE_QUESTION_MARK

§

TK_PERCENT

§

TK_TILDE

§

TK_SINGLE_PIPE

§

TK_DOUBLE_PIPE

§

TK_AMPERSAND

§

TK_DOUBLE_AMPERSAND

§

TK_FORWARD_SLASH

§

TK_DOUBLE_FORWARD_SLASH

§

TK_BACKWARD_SLASH

§

TK_OPEN_PARENTHESIS

§

TK_CLOSE_PARENTHESIS

§

TK_OPEN_CURLY

§

TK_CLOSE_CURLY

§

TK_OPEN_SQUARE

§

TK_CLOSE_SQUARE

§

TK_LESS_THAN

§

TK_LESS_THAN_EQUAL

§

TK_LESS_THAN_EQUAL_GREATER_THAN

§

TK_LESS_THAN_SLASH

§

TK_LESS_THAN_EXCLAMATION_MARK

§

TK_DOCTYPE

§

TK_GREATER_THAN

§

TK_GREATER_THAN_EQUAL

§

TK_SLASH_GREATER_THAN

§

TK_LESS_THAN_EXCLAMATION_MARK_MINUS_MINUS

§

TK_MINUS_MINUS_GREATER_THAN

§

TK_EQUAL

§

TK_DOUBLE_EQUAL

§

TK_TRIPLE_EQUAL

§

TK_PLUS

§

TK_MINUS

§

TK_STAR

§

TK_DOUBLE_STAR

§

TK_DOUBLE_QUOTES

§

TK_SINGLE_QUOTES

§

TK_GRAVE_ACCENT_QUOTES

§

TK_CURLY_PERCENT

§

TK_PERCENT_CURLY

§

TK_OPEN_CURLY_CURLY

§

TK_CLOSE_CURLY_CURLY

§

TK_OPEN_CURLY_HASHTAG

§

TK_HASHTAG_CLOSE_CURLY

§

TK_HASHTAG

§

TK_TRUE

§

TK_FALSE

§

TK_BLOCK

§

TK_ENDBLOCK

§

TK_IF

§

TK_ELSE_IF

§

TK_ELSE

§

TK_ENDIF

§

TK_APPLY

§

TK_ENDAPPLY

§

TK_AUTOESCAPE

§

TK_ENDAUTOESCAPE

§

TK_CACHE

§

TK_ENDCACHE

§

TK_DEPRECATED

§

TK_DO

§

TK_EMBED

§

TK_ENDEMBED

§

TK_EXTENDS

§

TK_FLUSH

§

TK_FOR

§

TK_ENDFOR

§

TK_FROM

§

TK_IMPORT

§

TK_MACRO

§

TK_ENDMACRO

§

TK_SANDBOX

§

TK_ENDSANDBOX

§

TK_SET

§

TK_ENDSET

§

TK_USE

§

TK_VERBATIM

§

TK_ENDVERBATIM

§

TK_ONLY

§

TK_IGNORE_MISSING

§

TK_WITH

§

TK_ENDWITH

§

TK_TTL

§

TK_TAGS

§

TK_NOT

§

TK_OR

§

TK_AND

§

TK_BINARY_OR

§

TK_BINARY_XOR

§

TK_BINARY_AND

§

TK_IN

§

TK_MATCHES

§

TK_STARTS_WITH

§

TK_ENDS_WITH

§

TK_IS

§

TK_EVEN

§

TK_ODD

§

TK_DEFINED

§

TK_SAME_AS

§

TK_AS

§

TK_NONE

§

TK_NULL

§

TK_DIVISIBLE_BY

§

TK_CONSTANT

§

TK_EMPTY

§

TK_ITERABLE

§

TK_MAX

§

TK_MIN

§

TK_RANGE

§

TK_CYCLE

§

TK_RANDOM

§

TK_DATE

§

TK_INCLUDE

§

TK_SOURCE

§

TK_SW_EXTENDS

§

TK_SW_SILENT_FEATURE_CALL

§

TK_ENDSW_SILENT_FEATURE_CALL

§

TK_SW_INCLUDE

§

TK_RETURN

§

TK_SW_ICON

§

TK_SW_THUMBNAILS

§

TK_STYLE

§

TK_LUDTWIG_IGNORE_FILE

§

TK_LUDTWIG_IGNORE

§

TK_UNKNOWN

§

BODY

§

TWIG_VAR

§

TWIG_EXPRESSION

§

TWIG_BINARY_EXPRESSION

§

TWIG_UNARY_EXPRESSION

§

TWIG_PARENTHESES_EXPRESSION

§

TWIG_CONDITIONAL_EXPRESSION

§

TWIG_OPERAND

§

TWIG_ACCESSOR

§

TWIG_FILTER

§

TWIG_INDEX_LOOKUP

§

TWIG_INDEX

§

TWIG_INDEX_RANGE

§

TWIG_FUNCTION_CALL

§

TWIG_ARGUMENTS

§

TWIG_NAMED_ARGUMENT

§

TWIG_LITERAL_STRING

§

TWIG_LITERAL_STRING_INNER

§

TWIG_LITERAL_STRING_INTERPOLATION

§

TWIG_LITERAL_NUMBER

§

TWIG_LITERAL_ARRAY

§

TWIG_LITERAL_ARRAY_INNER

§

TWIG_LITERAL_NULL

§

TWIG_LITERAL_BOOLEAN

§

TWIG_LITERAL_HASH

§

TWIG_LITERAL_HASH_ITEMS

§

TWIG_LITERAL_HASH_PAIR

§

TWIG_LITERAL_HASH_KEY

§

TWIG_LITERAL_HASH_VALUE

§

TWIG_LITERAL_NAME

§

TWIG_COMMENT

§

TWIG_BLOCK

§

TWIG_STARTING_BLOCK

§

TWIG_ENDING_BLOCK

§

TWIG_IF

§

TWIG_IF_BLOCK

§

TWIG_ELSE_IF_BLOCK

§

TWIG_ELSE_BLOCK

§

TWIG_ENDIF_BLOCK

§

TWIG_SET

§

TWIG_SET_BLOCK

§

TWIG_ENDSET_BLOCK

§

TWIG_ASSIGNMENT

§

TWIG_FOR

§

TWIG_FOR_BLOCK

§

TWIG_FOR_ELSE_BLOCK

§

TWIG_ENDFOR_BLOCK

§

TWIG_EXTENDS

§

TWIG_INCLUDE

§

TWIG_INCLUDE_WITH

§

TWIG_USE

§

TWIG_OVERRIDE

§

TWIG_APPLY

§

TWIG_APPLY_STARTING_BLOCK

§

TWIG_APPLY_ENDING_BLOCK

§

TWIG_AUTOESCAPE

§

TWIG_AUTOESCAPE_STARTING_BLOCK

§

TWIG_AUTOESCAPE_ENDING_BLOCK

§

TWIG_DEPRECATED

§

TWIG_DO

§

TWIG_EMBED

§

TWIG_EMBED_STARTING_BLOCK

§

TWIG_EMBED_ENDING_BLOCK

§

TWIG_FLUSH

§

TWIG_FROM

§

TWIG_IMPORT

§

TWIG_SANDBOX

§

TWIG_SANDBOX_STARTING_BLOCK

§

TWIG_SANDBOX_ENDING_BLOCK

§

TWIG_VERBATIM

§

TWIG_VERBATIM_STARTING_BLOCK

§

TWIG_VERBATIM_ENDING_BLOCK

§

TWIG_MACRO

§

TWIG_MACRO_STARTING_BLOCK

§

TWIG_MACRO_ENDING_BLOCK

§

TWIG_WITH

§

TWIG_WITH_STARTING_BLOCK

§

TWIG_WITH_ENDING_BLOCK

§

TWIG_CACHE

§

TWIG_CACHE_TTL

§

TWIG_CACHE_TAGS

§

TWIG_CACHE_STARTING_BLOCK

§

TWIG_CACHE_ENDING_BLOCK

§

SHOPWARE_TWIG_SW_EXTENDS

§

SHOPWARE_TWIG_SW_INCLUDE

§

SHOPWARE_SILENT_FEATURE_CALL

§

SHOPWARE_SILENT_FEATURE_CALL_STARTING_BLOCK

§

SHOPWARE_SILENT_FEATURE_CALL_ENDING_BLOCK

§

SHOPWARE_RETURN

§

SHOPWARE_ICON

§

SHOPWARE_ICON_STYLE

§

SHOPWARE_THUMBNAILS

§

SHOPWARE_THUMBNAILS_WITH

§

HTML_DOCTYPE

§

HTML_ATTRIBUTE_LIST

§

HTML_ATTRIBUTE

§

HTML_STRING

§

HTML_STRING_INNER

§

HTML_TEXT

§

HTML_COMMENT

§

HTML_TAG

§

HTML_STARTING_TAG

§

HTML_ENDING_TAG

§

LUDTWIG_DIRECTIVE_FILE_IGNORE

§

LUDTWIG_DIRECTIVE_IGNORE

§

LUDTWIG_DIRECTIVE_RULE_LIST

§

ERROR

§

ROOT

SAFETY: this must be the last enum element for u16 conversion!

Implementations§

Trait Implementations§

source§

impl Clone for SyntaxKind

source§

fn clone(&self) -> SyntaxKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SyntaxKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for SyntaxKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SyntaxKind> for SyntaxKind

Some boilerplate is needed, as rowan settled on using its own struct SyntaxKind(u16) internally, instead of accepting the user’s enum SyntaxKind as a type parameter.

First, to easily pass the enum variants into rowan via .into():

source§

fn from(kind: SyntaxKind) -> Self

Converts to this type from the input type.
source§

impl Hash for SyntaxKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'s> Logos<'s> for SyntaxKind

§

type Extras = ()

Associated type Extras for the particular lexer. This can be set using #[logos(extras = MyExtras)] and accessed inside callbacks.
§

type Source = str

Source type this token can be lexed from. This will default to str, unless one of the defined patterns explicitly uses non-unicode byte values or byte slices, in which case that implementation will use [u8].
source§

const ERROR: Self = SyntaxKind::TK_UNKNOWN

Helper const of the variant marked as #[error].
source§

fn lex(lex: &mut Lexer<'s, Self>)

The heart of Logos. Called by the Lexer. The implementation for this function is generated by the logos-derive crate.
source§

fn lexer_with_extras( source: &'source Self::Source, extras: Self::Extras ) -> Lexer<'source, Self>

Create a new instance of a Lexer with the provided Extras that will produce tokens implementing this Logos.
source§

impl Ord for SyntaxKind

source§

fn cmp(&self, other: &SyntaxKind) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<SyntaxKind> for SyntaxKind

source§

fn eq(&self, other: &SyntaxKind) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<SyntaxKind> for SyntaxKind

source§

fn partial_cmp(&self, other: &SyntaxKind) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for SyntaxKind

source§

impl Eq for SyntaxKind

source§

impl StructuralEq for SyntaxKind

source§

impl StructuralPartialEq for SyntaxKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.