#[repr(u16)]
pub enum SyntaxKind {
Show 141 variants EOF, UNKNOWN, ERROR, INFIX_OR_APP_EXP, INFIX_OR_APP_PAT, WHITESPACE, COMMENT, ABSTYPE_KW, AND_KW, ANDALSO_KW, AS_KW, CASE_KW, DATATYPE_KW, DO_KW, ELSE_KW, END_KW, EXCEPTION_KW, FN_KW, FUN_KW, HANDLE_KW, IF_KW, IN_KW, INFIX_KW, INFIXR_KW, LET_KW, LOCAL_KW, NONFIX_KW, OF_KW, OP_KW, OPEN_KW, ORELSE_KW, RAISE_KW, REC_KW, THEN_KW, TYPE_KW, VAL_KW, WITH_KW, WITHTYPE_KW, WHILE_KW, L_PAREN, R_PAREN, L_BRACKET, R_BRACKET, L_BRACE, R_BRACE, COMMA, COLON, SEMICOLON, ELLIPSIS, UNDERSCORE, PIPE, EQ, THICK_ARROW, THIN_ARROW, HASH, DOT, STAR, SCON_EXP, VID_EXP, RECORD_EXP, RECORD_SEL_EXP, LET_EXP, PAREN_EXP, EXP_ROW, TY_EXP, HANDLE_EXP, RAISE_EXP, FN_EXP, MATCH, MRULE, VAL_DEC, TY_DEC, DATATYPE_DEC, DATATYPE_REP, ABSTYPE_DEC, EXCEPT_DEC, LOCAL_DEC, OPEN_DEC, SEQ_DEC, INFIX_DEC, INFIXR_DEC, NONFIX_DEC, FIXITY, VAL_BIND, TY_BIND, DATA_BIND, CON_BIND, EX_BIND, EX_BIND_NOEQ, EX_BIND_EQ, WILDCARD_PAT, SCON_PAT, VID_PAT, RECORD_PAT, PAT_ROW, PAT_ROW_PAT, TY_PAT, LAYERED_PAT, TY, TYVAR_TY, RECORD_TY, CON_TY, FUN_TY, TY_ROW, DERIV_EXP, UNIT_EXP, TUPLE_EXP, ACCESSOR_EXP, CASE_MATCH_EXP, IF_EXP, ORELSE_EXP, ANDALSO_EXP, SEQ_EXP, WHILE_EXP, LIST_EXP, DERIV_PAT, UNIT_PAT, TUPLE_PAT, LIST_PAT, LAB_AS_VAR_PAT, LAB_AS_VAR_TY, LAB_AS_VAR_AS_PAT, TUPLE_TY_EXP, FVAL_BIND, FVAL_BIND_ROW, FUN_DEC, INT, REAL, WORD, CHAR, STRING, IDENT, VID, LONG_VID, TYVAR, TY_CON, LONG_TY_CON, LAB, STRID, LONG_STRID, FILE,
}
Expand description

Kinds of syntax nodes in the Core SML language.

Variants§

§

EOF

§

UNKNOWN

§

ERROR

§

INFIX_OR_APP_EXP

§

INFIX_OR_APP_PAT

§

WHITESPACE

§

COMMENT

§

ABSTYPE_KW

§

AND_KW

§

ANDALSO_KW

§

AS_KW

§

CASE_KW

§

DATATYPE_KW

§

DO_KW

§

ELSE_KW

§

END_KW

§

EXCEPTION_KW

§

FN_KW

§

FUN_KW

§

HANDLE_KW

§

IF_KW

§

IN_KW

§

INFIX_KW

§

INFIXR_KW

§

LET_KW

§

LOCAL_KW

§

NONFIX_KW

§

OF_KW

§

OP_KW

§

OPEN_KW

§

ORELSE_KW

§

RAISE_KW

§

REC_KW

§

THEN_KW

§

TYPE_KW

§

VAL_KW

§

WITH_KW

§

WITHTYPE_KW

§

WHILE_KW

§

L_PAREN

§

R_PAREN

§

L_BRACKET

§

R_BRACKET

§

L_BRACE

§

R_BRACE

§

COMMA

§

COLON

§

SEMICOLON

§

ELLIPSIS

§

UNDERSCORE

§

PIPE

§

EQ

§

THICK_ARROW

§

THIN_ARROW

§

HASH

§

DOT

§

STAR

§

SCON_EXP

§

VID_EXP

§

RECORD_EXP

§

RECORD_SEL_EXP

§

LET_EXP

§

PAREN_EXP

§

EXP_ROW

§

TY_EXP

§

HANDLE_EXP

§

RAISE_EXP

§

FN_EXP

§

MATCH

§

MRULE

§

VAL_DEC

§

TY_DEC

§

DATATYPE_DEC

§

DATATYPE_REP

§

ABSTYPE_DEC

§

EXCEPT_DEC

§

LOCAL_DEC

§

OPEN_DEC

§

SEQ_DEC

§

INFIX_DEC

§

INFIXR_DEC

§

NONFIX_DEC

§

FIXITY

§

VAL_BIND

§

TY_BIND

§

DATA_BIND

§

CON_BIND

§

EX_BIND

§

EX_BIND_NOEQ

§

EX_BIND_EQ

§

WILDCARD_PAT

§

SCON_PAT

§

VID_PAT

§

RECORD_PAT

§

PAT_ROW

§

PAT_ROW_PAT

§

TY_PAT

§

LAYERED_PAT

§

TY

§

TYVAR_TY

§

RECORD_TY

§

CON_TY

§

FUN_TY

§

TY_ROW

§

DERIV_EXP

§

UNIT_EXP

§

TUPLE_EXP

§

ACCESSOR_EXP

§

CASE_MATCH_EXP

§

IF_EXP

§

ORELSE_EXP

§

ANDALSO_EXP

§

SEQ_EXP

§

WHILE_EXP

§

LIST_EXP

§

DERIV_PAT

§

UNIT_PAT

§

TUPLE_PAT

§

LIST_PAT

§

LAB_AS_VAR_PAT

§

LAB_AS_VAR_TY

§

LAB_AS_VAR_AS_PAT

§

TUPLE_TY_EXP

§

FVAL_BIND

§

FVAL_BIND_ROW

§

FUN_DEC

§

INT

§

REAL

§

WORD

§

CHAR

§

STRING

§

IDENT

§

VID

§

LONG_VID

§

TYVAR

§

TY_CON

§

LONG_TY_CON

§

LAB

§

STRID

§

LONG_STRID

§

FILE

Implementations§

Returns true if self is a special constant (literal).

Returns true if self is trivia (whitespace or comment).

Returns true if self is a keyword signalling a declaration.

Returns true if self is the start of a atomic type (either a type variable or the start of a record or tuple type).

Returns true if self is a keyword.

Returns true if self is the start of an atomic expression.

Returns true if self is the start of an atomic pattern.

Returns Some(kind) if s is a keyword, else None.

Returns Some(kind) if s is a symbol, else None.

Converts a lex token to a parse token.

Note that the return type is a (val, err) tuple instead of a Result. This is because we want to collect errors here but defer their handling until after everything has been parsed.

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
Converts to this type from the input type.
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 !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.