#[non_exhaustive]#[repr(u16)]pub enum SyntaxKind {
Show 139 variants
BANG,
L_PAREN,
R_PAREN,
L_CURLY,
R_CURLY,
L_BRACK,
R_BRACK,
COMMA,
AT,
DOLLAR,
AMP,
PIPE,
SPREAD,
EQ,
COLON,
query_KW,
mutation_KW,
repeatable_KW,
subscription_KW,
fragment_KW,
on_KW,
null_KW,
extend_KW,
schema_KW,
scalar_KW,
implements_KW,
interface_KW,
union_KW,
enum_KW,
input_KW,
directive_KW,
type_KW,
true_KW,
false_KW,
QUERY_KW,
MUTATION_KW,
SUBSCRIPTION_KW,
FIELD_KW,
FRAGMENT_DEFINITION_KW,
FRAGMENT_SPREAD_KW,
INLINE_FRAGMENT_KW,
VARIABLE_DEFINITION_KW,
SCHEMA_KW,
SCALAR_KW,
OBJECT_KW,
FIELD_DEFINITION_KW,
ARGUMENT_DEFINITION_KW,
INTERFACE_KW,
UNION_KW,
ENUM_KW,
ENUM_VALUE_KW,
INPUT_OBJECT_KW,
INPUT_FIELD_DEFINITION_KW,
INT,
FLOAT,
STRING,
IDENT,
WHITESPACE,
COMMENT,
ERROR,
NAME,
INTEGER_PART,
NEGATIVE_SIGN,
NON_ZERO_DIGIT,
DIGIT,
FRACTIONAL_PART,
EXPONENT_PART,
EXPONENT_INDICATOR,
SIGN,
DOCUMENT,
DEFINITION,
EXECUTABLE_DEFINITION,
TYPE_SYSTEM_DEFINITION,
TYPE_SYSTEM_EXTENSION,
OPERATION_DEFINITION,
FRAGMENT_DEFINITION,
OPERATION_TYPE,
DIRECTIVE,
DIRECTIVES,
SELECTION_SET,
SELECTION,
FIELD,
FRAGMENT_SPREAD,
INLINE_FRAGMENT,
ALIAS,
ARGUMENTS,
ARGUMENT,
VALUE,
STRING_VALUE,
INT_VALUE,
FLOAT_VALUE,
FRAGMENT_NAME,
TYPE_CONDITION,
VARIABLE,
BOOLEAN_VALUE,
NULL_VALUE,
ENUM_VALUE,
LIST_VALUE,
OBJECT_VALUE,
OBJECT_FIELD,
VARIABLE_DEFINITIONS,
VARIABLE_DEFINITION,
TYPE,
DEFAULT_VALUE,
NAMED_TYPE,
LIST_TYPE,
NON_NULL_TYPE,
SCHEMA_DEFINITION,
TYPE_DEFINITION,
DIRECTIVE_DEFINITION,
SCHEMA_EXTENSION,
TYPE_EXTENSION,
ROOT_OPERATION_TYPE_DEFINITION,
DESCRIPTION,
SCALAR_TYPE_DEFINITION,
OBJECT_TYPE_DEFINITION,
INTERFACE_TYPE_DEFINITION,
UNION_TYPE_DEFINITION,
ENUM_TYPE_DEFINITION,
INPUT_OBJECT_TYPE_DEFINITION,
SCALAR_TYPE_EXTENSION,
OBJECT_TYPE_EXTENSION,
INTERFACE_TYPE_EXTENSION,
UNION_TYPE_EXTENSION,
ENUM_TYPE_EXTENSION,
INPUT_OBJECT_TYPE_EXTENSION,
IMPLEMENTS_INTERFACES,
FIELDS_DEFINITION,
FIELD_DEFINITION,
ARGUMENTS_DEFINITION,
UNION_MEMBER_TYPES,
ENUM_VALUES_DEFINITION,
ENUM_VALUE_DEFINITION,
INPUT_FIELDS_DEFINITION,
INPUT_VALUE_DEFINITION,
DIRECTIVE_LOCATIONS,
DIRECTIVE_LOCATION,
EXECUTABLE_DIRECTIVE_LOCATION,
TYPE_SYSTEM_DIRECTIVE_LOCATION,
}
Expand description
A token generated by the Parser
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BANG
L_PAREN
R_PAREN
L_CURLY
R_CURLY
L_BRACK
R_BRACK
COMMA
AT
DOLLAR
AMP
PIPE
SPREAD
EQ
COLON
query_KW
mutation_KW
repeatable_KW
subscription_KW
fragment_KW
on_KW
null_KW
extend_KW
schema_KW
scalar_KW
implements_KW
interface_KW
union_KW
enum_KW
input_KW
directive_KW
type_KW
true_KW
false_KW
QUERY_KW
MUTATION_KW
SUBSCRIPTION_KW
FIELD_KW
FRAGMENT_DEFINITION_KW
FRAGMENT_SPREAD_KW
INLINE_FRAGMENT_KW
VARIABLE_DEFINITION_KW
SCHEMA_KW
SCALAR_KW
OBJECT_KW
FIELD_DEFINITION_KW
ARGUMENT_DEFINITION_KW
INTERFACE_KW
UNION_KW
ENUM_KW
ENUM_VALUE_KW
INPUT_OBJECT_KW
INPUT_FIELD_DEFINITION_KW
INT
FLOAT
STRING
IDENT
WHITESPACE
COMMENT
ERROR
NAME
INTEGER_PART
NEGATIVE_SIGN
NON_ZERO_DIGIT
DIGIT
FRACTIONAL_PART
EXPONENT_PART
EXPONENT_INDICATOR
SIGN
DOCUMENT
DEFINITION
EXECUTABLE_DEFINITION
TYPE_SYSTEM_DEFINITION
TYPE_SYSTEM_EXTENSION
OPERATION_DEFINITION
FRAGMENT_DEFINITION
OPERATION_TYPE
DIRECTIVE
DIRECTIVES
SELECTION_SET
SELECTION
FIELD
FRAGMENT_SPREAD
INLINE_FRAGMENT
ALIAS
ARGUMENTS
ARGUMENT
VALUE
STRING_VALUE
INT_VALUE
FLOAT_VALUE
FRAGMENT_NAME
TYPE_CONDITION
VARIABLE
BOOLEAN_VALUE
NULL_VALUE
ENUM_VALUE
LIST_VALUE
OBJECT_VALUE
OBJECT_FIELD
VARIABLE_DEFINITIONS
VARIABLE_DEFINITION
TYPE
DEFAULT_VALUE
NAMED_TYPE
LIST_TYPE
NON_NULL_TYPE
SCHEMA_DEFINITION
TYPE_DEFINITION
DIRECTIVE_DEFINITION
SCHEMA_EXTENSION
TYPE_EXTENSION
ROOT_OPERATION_TYPE_DEFINITION
DESCRIPTION
SCALAR_TYPE_DEFINITION
OBJECT_TYPE_DEFINITION
INTERFACE_TYPE_DEFINITION
UNION_TYPE_DEFINITION
ENUM_TYPE_DEFINITION
INPUT_OBJECT_TYPE_DEFINITION
SCALAR_TYPE_EXTENSION
OBJECT_TYPE_EXTENSION
INTERFACE_TYPE_EXTENSION
UNION_TYPE_EXTENSION
ENUM_TYPE_EXTENSION
INPUT_OBJECT_TYPE_EXTENSION
IMPLEMENTS_INTERFACES
FIELDS_DEFINITION
FIELD_DEFINITION
ARGUMENTS_DEFINITION
UNION_MEMBER_TYPES
ENUM_VALUES_DEFINITION
ENUM_VALUE_DEFINITION
INPUT_FIELDS_DEFINITION
INPUT_VALUE_DEFINITION
DIRECTIVE_LOCATIONS
DIRECTIVE_LOCATION
EXECUTABLE_DIRECTIVE_LOCATION
TYPE_SYSTEM_DIRECTIVE_LOCATION
Implementations§
source§impl SyntaxKind
impl SyntaxKind
pub fn is_keyword(self) -> bool
pub fn is_punct(self) -> bool
pub fn is_literal(self) -> bool
pub fn from_keyword(ident: &str) -> Option<SyntaxKind>
pub fn from_char(c: char) -> Option<SyntaxKind>
Trait Implementations§
source§impl Clone for SyntaxKind
impl Clone for SyntaxKind
source§fn clone(&self) -> SyntaxKind
fn clone(&self) -> SyntaxKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SyntaxKind
impl Debug for SyntaxKind
source§impl From<SyntaxKind> for u16
impl From<SyntaxKind> for u16
source§fn from(k: SyntaxKind) -> u16
fn from(k: SyntaxKind) -> u16
Converts to this type from the input type.
source§impl From<u16> for SyntaxKind
impl From<u16> for SyntaxKind
source§fn from(d: u16) -> SyntaxKind
fn from(d: u16) -> SyntaxKind
Converts to this type from the input type.
source§impl Hash for SyntaxKind
impl Hash for SyntaxKind
source§impl Ord for SyntaxKind
impl Ord for SyntaxKind
source§fn cmp(&self, other: &SyntaxKind) -> Ordering
fn cmp(&self, other: &SyntaxKind) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SyntaxKind
impl PartialEq for SyntaxKind
source§impl PartialOrd for SyntaxKind
impl PartialOrd for SyntaxKind
impl Copy for SyntaxKind
impl Eq for SyntaxKind
impl StructuralPartialEq for SyntaxKind
Auto Trait Implementations§
impl Freeze for SyntaxKind
impl RefUnwindSafe for SyntaxKind
impl Send for SyntaxKind
impl Sync for SyntaxKind
impl Unpin for SyntaxKind
impl UnwindSafe for SyntaxKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)