Enum syntax::SyntaxKind[][src]

#[repr(u16)]
pub enum SyntaxKind {
Show 244 variants SEMICOLON, COMMA, L_PAREN, R_PAREN, L_CURLY, R_CURLY, L_BRACK, R_BRACK, L_ANGLE, R_ANGLE, AT, POUND, TILDE, QUESTION, DOLLAR, AMP, PIPE, PLUS, STAR, SLASH, CARET, PERCENT, UNDERSCORE, DOT, DOT2, DOT3, DOT2EQ, COLON, COLON2, EQ, EQ2, FAT_ARROW, BANG, NEQ, MINUS, THIN_ARROW, LTEQ, GTEQ, PLUSEQ, MINUSEQ, PIPEEQ, AMPEQ, CARETEQ, SLASHEQ, STAREQ, PERCENTEQ, AMP2, PIPE2, SHL, SHR, SHLEQ, SHREQ, AS_KW, ASYNC_KW, AWAIT_KW, BOX_KW, BREAK_KW, CONST_KW, CONTINUE_KW, CRATE_KW, DYN_KW, ELSE_KW, ENUM_KW, EXTERN_KW, FALSE_KW, FN_KW, FOR_KW, IF_KW, IMPL_KW, IN_KW, LET_KW, LOOP_KW, MACRO_KW, MATCH_KW, MOD_KW, MOVE_KW, MUT_KW, PUB_KW, REF_KW, RETURN_KW, SELF_KW, STATIC_KW, STRUCT_KW, SUPER_KW, TRAIT_KW, TRUE_KW, TRY_KW, TYPE_KW, UNSAFE_KW, USE_KW, WHERE_KW, WHILE_KW, YIELD_KW, AUTO_KW, DEFAULT_KW, EXISTENTIAL_KW, UNION_KW, RAW_KW, MACRO_RULES_KW, INT_NUMBER, FLOAT_NUMBER, CHAR, BYTE, STRING, BYTE_STRING, ERROR, IDENT, WHITESPACE, LIFETIME_IDENT, COMMENT, SHEBANG, SOURCE_FILE, STRUCT, UNION, ENUM, FN, RET_TYPE, EXTERN_CRATE, MODULE, USE, STATIC, CONST, TRAIT, IMPL, TYPE_ALIAS, MACRO_CALL, MACRO_RULES, MACRO_ARM, TOKEN_TREE, MACRO_DEF, PAREN_TYPE, TUPLE_TYPE, MACRO_TYPE, NEVER_TYPE, PATH_TYPE, PTR_TYPE, ARRAY_TYPE, SLICE_TYPE, REF_TYPE, INFER_TYPE, FN_PTR_TYPE, FOR_TYPE, IMPL_TRAIT_TYPE, DYN_TRAIT_TYPE, OR_PAT, PAREN_PAT, REF_PAT, BOX_PAT, IDENT_PAT, WILDCARD_PAT, REST_PAT, PATH_PAT, RECORD_PAT, RECORD_PAT_FIELD_LIST, RECORD_PAT_FIELD, TUPLE_STRUCT_PAT, TUPLE_PAT, SLICE_PAT, RANGE_PAT, LITERAL_PAT, MACRO_PAT, CONST_BLOCK_PAT, TUPLE_EXPR, ARRAY_EXPR, PAREN_EXPR, PATH_EXPR, CLOSURE_EXPR, IF_EXPR, WHILE_EXPR, CONDITION, LOOP_EXPR, FOR_EXPR, CONTINUE_EXPR, BREAK_EXPR, LABEL, BLOCK_EXPR, STMT_LIST, RETURN_EXPR, YIELD_EXPR, MATCH_EXPR, MATCH_ARM_LIST, MATCH_ARM, MATCH_GUARD, RECORD_EXPR, RECORD_EXPR_FIELD_LIST, RECORD_EXPR_FIELD, BOX_EXPR, CALL_EXPR, INDEX_EXPR, METHOD_CALL_EXPR, FIELD_EXPR, AWAIT_EXPR, TRY_EXPR, CAST_EXPR, REF_EXPR, PREFIX_EXPR, RANGE_EXPR, BIN_EXPR, EXTERN_BLOCK, EXTERN_ITEM_LIST, VARIANT, RECORD_FIELD_LIST, RECORD_FIELD, TUPLE_FIELD_LIST, TUPLE_FIELD, VARIANT_LIST, ITEM_LIST, ASSOC_ITEM_LIST, ATTR, META, USE_TREE, USE_TREE_LIST, PATH, PATH_SEGMENT, LITERAL, RENAME, VISIBILITY, WHERE_CLAUSE, WHERE_PRED, ABI, NAME, NAME_REF, LET_STMT, LET_ELSE, EXPR_STMT, GENERIC_PARAM_LIST, GENERIC_PARAM, LIFETIME_PARAM, TYPE_PARAM, CONST_PARAM, GENERIC_ARG_LIST, LIFETIME, LIFETIME_ARG, TYPE_ARG, ASSOC_TYPE_ARG, CONST_ARG, PARAM_LIST, PARAM, SELF_PARAM, ARG_LIST, TYPE_BOUND, TYPE_BOUND_LIST, MACRO_ITEMS, MACRO_STMTS, // some variants omitted
}
Expand description

The kind of syntax node, e.g. IDENT, USE_KW, or STRUCT.

Variants

SEMICOLON

COMMA

L_PAREN

R_PAREN

L_CURLY

R_CURLY

L_BRACK

R_BRACK

L_ANGLE

R_ANGLE

AT

POUND

TILDE

QUESTION

DOLLAR

AMP

PIPE

PLUS

STAR

SLASH

CARET

PERCENT

UNDERSCORE

DOT

DOT2

DOT3

DOT2EQ

COLON

COLON2

EQ

EQ2

FAT_ARROW

BANG

NEQ

MINUS

THIN_ARROW

LTEQ

GTEQ

PLUSEQ

MINUSEQ

PIPEEQ

AMPEQ

CARETEQ

SLASHEQ

STAREQ

PERCENTEQ

AMP2

PIPE2

SHL

SHR

SHLEQ

SHREQ

AS_KW

ASYNC_KW

AWAIT_KW

BOX_KW

BREAK_KW

CONST_KW

CONTINUE_KW

CRATE_KW

DYN_KW

ELSE_KW

ENUM_KW

EXTERN_KW

FALSE_KW

FN_KW

FOR_KW

IF_KW

IMPL_KW

IN_KW

LET_KW

LOOP_KW

MACRO_KW

MATCH_KW

MOD_KW

MOVE_KW

MUT_KW

PUB_KW

REF_KW

RETURN_KW

SELF_KW

STATIC_KW

STRUCT_KW

SUPER_KW

TRAIT_KW

TRUE_KW

TRY_KW

TYPE_KW

UNSAFE_KW

USE_KW

WHERE_KW

WHILE_KW

YIELD_KW

AUTO_KW

DEFAULT_KW

EXISTENTIAL_KW

UNION_KW

RAW_KW

MACRO_RULES_KW

INT_NUMBER

FLOAT_NUMBER

CHAR

BYTE

STRING

BYTE_STRING

ERROR

IDENT

WHITESPACE

LIFETIME_IDENT

COMMENT

SHEBANG

SOURCE_FILE

STRUCT

UNION

ENUM

FN

RET_TYPE

EXTERN_CRATE

MODULE

USE

STATIC

CONST

TRAIT

IMPL

TYPE_ALIAS

MACRO_CALL

MACRO_RULES

MACRO_ARM

TOKEN_TREE

MACRO_DEF

PAREN_TYPE

TUPLE_TYPE

MACRO_TYPE

NEVER_TYPE

PATH_TYPE

PTR_TYPE

ARRAY_TYPE

SLICE_TYPE

REF_TYPE

INFER_TYPE

FN_PTR_TYPE

FOR_TYPE

IMPL_TRAIT_TYPE

DYN_TRAIT_TYPE

OR_PAT

PAREN_PAT

REF_PAT

BOX_PAT

IDENT_PAT

WILDCARD_PAT

REST_PAT

PATH_PAT

RECORD_PAT

RECORD_PAT_FIELD_LIST

RECORD_PAT_FIELD

TUPLE_STRUCT_PAT

TUPLE_PAT

SLICE_PAT

RANGE_PAT

LITERAL_PAT

MACRO_PAT

CONST_BLOCK_PAT

TUPLE_EXPR

ARRAY_EXPR

PAREN_EXPR

PATH_EXPR

CLOSURE_EXPR

IF_EXPR

WHILE_EXPR

CONDITION

LOOP_EXPR

FOR_EXPR

CONTINUE_EXPR

BREAK_EXPR

LABEL

BLOCK_EXPR

STMT_LIST

RETURN_EXPR

YIELD_EXPR

MATCH_EXPR

MATCH_ARM_LIST

MATCH_ARM

MATCH_GUARD

RECORD_EXPR

RECORD_EXPR_FIELD_LIST

RECORD_EXPR_FIELD

BOX_EXPR

CALL_EXPR

INDEX_EXPR

METHOD_CALL_EXPR

FIELD_EXPR

AWAIT_EXPR

TRY_EXPR

CAST_EXPR

REF_EXPR

PREFIX_EXPR

RANGE_EXPR

BIN_EXPR

EXTERN_BLOCK

EXTERN_ITEM_LIST

VARIANT

RECORD_FIELD_LIST

RECORD_FIELD

TUPLE_FIELD_LIST

TUPLE_FIELD

VARIANT_LIST

ITEM_LIST

ASSOC_ITEM_LIST

ATTR

META

USE_TREE

USE_TREE_LIST

PATH

PATH_SEGMENT

LITERAL

RENAME

VISIBILITY

WHERE_CLAUSE

WHERE_PRED

ABI

NAME

NAME_REF

LET_STMT

LET_ELSE

EXPR_STMT

GENERIC_PARAM_LIST

GENERIC_PARAM

LIFETIME_PARAM

TYPE_PARAM

CONST_PARAM

GENERIC_ARG_LIST

LIFETIME

LIFETIME_ARG

TYPE_ARG

ASSOC_TYPE_ARG

CONST_ARG

PARAM_LIST

PARAM

SELF_PARAM

ARG_LIST

TYPE_BOUND

TYPE_BOUND_LIST

MACRO_ITEMS

MACRO_STMTS

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

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

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

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

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

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

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.