Enum i_slint_compiler::parser::SyntaxKind
source · [−]#[repr(u16)]
pub enum SyntaxKind {
Show 96 variants
Error,
Eof,
Whitespace,
Comment,
StringLiteral,
NumberLiteral,
ColorLiteral,
Identifier,
DoubleArrow,
PlusEqual,
MinusEqual,
StarEqual,
DivEqual,
LessEqual,
GreaterEqual,
EqualEqual,
NotEqual,
ColonEqual,
FatArrow,
Arrow,
OrOr,
AndAnd,
LBrace,
RBrace,
LParent,
RParent,
LAngle,
RAngle,
LBracket,
RBracket,
Plus,
Minus,
Star,
Div,
Equal,
Colon,
Comma,
Semicolon,
Bang,
Dot,
Question,
Dollar,
At,
Document,
Component,
SubElement,
Element,
RepeatedElement,
RepeatedIndex,
ConditionalElement,
CallbackDeclaration,
ReturnType,
CallbackConnection,
PropertyDeclaration,
PropertyAnimation,
QualifiedName,
DeclaredIdentifier,
ChildrenPlaceholder,
Binding,
TwoWayBinding,
BindingExpression,
CodeBlock,
ReturnStatement,
Expression,
StringTemplate,
AtImageUrl,
AtLinearGradient,
FunctionCallExpression,
IndexExpression,
SelfAssignment,
ConditionalExpression,
BinaryExpression,
UnaryOpExpression,
MemberAccess,
Array,
ObjectLiteral,
ObjectMember,
States,
State,
StatePropertyChange,
Transitions,
Transition,
ExportsList,
ExportSpecifier,
ExportIdentifier,
ExportName,
ImportSpecifier,
ImportIdentifierList,
ImportIdentifier,
ExternalName,
InternalName,
Type,
ObjectType,
ObjectTypeMember,
ArrayType,
StructDeclaration,
}
Variants
Error
Eof
Whitespace
Token
Comment
Token
StringLiteral
Token
NumberLiteral
Token
ColorLiteral
Token
Identifier
Token
DoubleArrow
Token
PlusEqual
Token
MinusEqual
Token
StarEqual
Token
DivEqual
Token
LessEqual
Token
GreaterEqual
Token
EqualEqual
Token
NotEqual
Token
ColonEqual
Token
FatArrow
Token
Arrow
Token
OrOr
Token
AndAnd
Token
LBrace
Token
RBrace
Token
LParent
Token
RParent
Token
LAngle
Token
RAngle
Token
LBracket
Token
RBracket
Token
Plus
Token
Minus
Token
Star
Token
Div
Token
Equal
Token
Colon
Token
Comma
Token
Semicolon
Token
Bang
Token
Dot
Token
Question
Token
Dollar
Token
At
Token
Document
Component
DeclaredIdentifier := Element { ... }
SubElement
id := Element { ... }
Element
RepeatedElement
RepeatedIndex
ConditionalElement
CallbackDeclaration
ReturnType
-> type
(but without the ->)
CallbackConnection
PropertyDeclaration
Declaration of a property.
PropertyAnimation
QualifiedName are the properties name
QualifiedName
wraps Identifiers, like Rectangle
or SomeModule.SomeType
DeclaredIdentifier
Wraps single identifier (to disambiguate when there are other identifier in the production)
ChildrenPlaceholder
Binding
TwoWayBinding
xxx <=> something
BindingExpression
the right-hand-side of a binding
CodeBlock
ReturnStatement
Expression
StringTemplate
Concatenate the Expressions to make a string (usually expended from a template string)
AtImageUrl
@image-url("foo.png")
AtLinearGradient
@linear-gradient(...)
FunctionCallExpression
expression()
IndexExpression
expression[index]
SelfAssignment
expression += expression
ConditionalExpression
condition ? first : second
BinaryExpression
expr + expr
UnaryOpExpression
- expr
MemberAccess
(foo).bar
, where foo
is the base expression, and bar
is a Identifier.
Array
[ ... ]
ObjectLiteral
{ foo: bar }
ObjectMember
foo: bar
inside an ObjectLiteral
States
states: [...]
State
The DeclaredIdentifier is the state name. The Expression, if any, is the condition.
StatePropertyChange
binding within a state
Transitions
transitions: [...]
Transition
There is an identifier “in” or “out”, the DeclaredIdentifier is the state name
ExportsList
Export a set of declared components by name
ExportSpecifier
Declare the first identifier to be exported, either under its name or instead under the name of the second identifier.
ExportIdentifier
ExportName
ImportSpecifier
import { foo, bar, baz } from “blah”; The import uri is stored as string literal.
ImportIdentifierList
ImportIdentifier
{ foo as bar } or just { foo }
ExternalName
InternalName
Type
The representation of a type
ObjectType
{foo: string, bar: string}
ObjectTypeMember
foo: type
inside an ObjectType
ArrayType
[ type ]
StructDeclaration
`struct Foo := { … }
Trait Implementations
sourceimpl Clone for SyntaxKind
impl Clone for SyntaxKind
sourcefn clone(&self) -> SyntaxKind
fn clone(&self) -> SyntaxKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SyntaxKind
impl Debug for SyntaxKind
sourceimpl Display for SyntaxKind
impl Display for SyntaxKind
sourceimpl From<SyntaxKind> for u16
impl From<SyntaxKind> for u16
sourcefn from(enum_value: SyntaxKind) -> Self
fn from(enum_value: SyntaxKind) -> Self
Converts to this type from the input type.
sourceimpl From<SyntaxKind> for SyntaxKind
impl From<SyntaxKind> for SyntaxKind
sourcefn from(v: SyntaxKind) -> Self
fn from(v: SyntaxKind) -> Self
Converts to this type from the input type.
sourceimpl Hash for SyntaxKind
impl Hash for SyntaxKind
sourceimpl Ord for SyntaxKind
impl Ord for SyntaxKind
sourceimpl PartialEq<SyntaxKind> for SyntaxKind
impl PartialEq<SyntaxKind> for SyntaxKind
sourceimpl PartialOrd<SyntaxKind> for SyntaxKind
impl PartialOrd<SyntaxKind> for SyntaxKind
sourcefn partial_cmp(&self, other: &SyntaxKind) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
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 · sourcefn le(&self, other: &Rhs) -> bool
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
sourceimpl TryFrom<u16> for SyntaxKind
impl TryFrom<u16> for SyntaxKind
type Error = TryFromPrimitiveError<SyntaxKind>
type Error = TryFromPrimitiveError<SyntaxKind>
The type returned in the event of a conversion error.
sourcefn try_from(number: u16) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u16) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for SyntaxKind
impl TryFromPrimitive for SyntaxKind
type Primitive = u16
const NAME: &'static str = "SyntaxKind"
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for SyntaxKind
impl Eq for SyntaxKind
impl StructuralEq for SyntaxKind
impl StructuralPartialEq for SyntaxKind
Auto Trait Implementations
impl RefUnwindSafe for SyntaxKind
impl Send for SyntaxKind
impl Sync for SyntaxKind
impl Unpin for SyntaxKind
impl UnwindSafe for SyntaxKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more