Skip to main content

TclElementType

Enum TclElementType 

Source
#[repr(u8)]
pub enum TclElementType {
Show 61 variants Root = 0, Command = 1, ProcDefinition = 2, IfCommand = 3, WhileCommand = 4, ForCommand = 5, ForEachCommand = 6, SetCommand = 7, Word = 8, SimpleWord = 9, VariableWord = 10, ScriptWord = 11, BracedWord = 12, Number = 13, StringLiteral = 14, Identifier = 15, If = 16, Else = 17, ElseIf = 18, For = 19, While = 20, ForEach = 21, Proc = 22, Return = 23, Break = 24, Continue = 25, Set = 26, Unset = 27, Global = 28, Upvar = 29, Variable = 30, Plus = 31, Minus = 32, Star = 33, Slash = 34, Percent = 35, Equal = 36, NotEqual = 37, Less = 38, Greater = 39, LessEqual = 40, GreaterEqual = 41, Ampersand = 42, AmpersandAmpersand = 43, Pipe = 44, PipePipe = 45, Exclamation = 46, LeftParen = 47, RightParen = 48, LeftBracket = 49, RightBracket = 50, LeftBrace = 51, RightBrace = 52, Semicolon = 53, Comma = 54, Dollar = 55, Whitespace = 56, Newline = 57, Comment = 58, Error = 59, Eof = 60,
}
Expand description

Tcl element type definition

Variants§

§

Root = 0

Root node

§

Command = 1

Command

§

ProcDefinition = 2

Proc definition

§

IfCommand = 3

If command

§

WhileCommand = 4

While command

§

ForCommand = 5

For command

§

ForEachCommand = 6

ForEach command

§

SetCommand = 7

Set command

§

Word = 8

Word

§

SimpleWord = 9

Simple word

§

VariableWord = 10

Variable word

§

ScriptWord = 11

Script word

§

BracedWord = 12

Braced word

§

Number = 13

Number

§

StringLiteral = 14

String literal

§

Identifier = 15

Identifier

§

If = 16

if keyword

§

Else = 17

else keyword

§

ElseIf = 18

elseif keyword

§

For = 19

for keyword

§

While = 20

while keyword

§

ForEach = 21

foreach keyword

§

Proc = 22

proc keyword

§

Return = 23

return keyword

§

Break = 24

break keyword

§

Continue = 25

continue keyword

§

Set = 26

set keyword

§

Unset = 27

unset keyword

§

Global = 28

global keyword

§

Upvar = 29

upvar keyword

§

Variable = 30

variable keyword

§

Plus = 31

Plus (+)

§

Minus = 32

Minus (-)

§

Star = 33

Star (*)

§

Slash = 34

Slash (/)

§

Percent = 35

Percent (%)

§

Equal = 36

Equal (=)

§

NotEqual = 37

Not equal (!=)

§

Less = 38

Less (<)

§

Greater = 39

Greater (>)

§

LessEqual = 40

Less equal (<=)

§

GreaterEqual = 41

Greater equal (>=)

§

Ampersand = 42

Ampersand (&)

§

AmpersandAmpersand = 43

Logical AND (&&)

§

Pipe = 44

Pipe (|)

§

PipePipe = 45

Logical OR (||)

§

Exclamation = 46

Exclamation (!)

§

LeftParen = 47

Left parenthesis (()

§

RightParen = 48

Right parenthesis ())

§

LeftBracket = 49

Left bracket ([)

§

RightBracket = 50

Right bracket (])

§

LeftBrace = 51

Left brace ({)

§

RightBrace = 52

Right brace (})

§

Semicolon = 53

Semicolon (;)

§

Comma = 54

Comma (,)

§

Dollar = 55

Dollar ($)

§

Whitespace = 56

Whitespace

§

Newline = 57

Newline

§

Comment = 58

Comment

§

Error = 59

Error

§

Eof = 60

End of file

Trait Implementations§

Source§

impl Clone for TclElementType

Source§

fn clone(&self) -> TclElementType

Returns a duplicate 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 TclElementType

Source§

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

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

impl<'de> Deserialize<'de> for TclElementType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl ElementType for TclElementType

Source§

type Role = UniversalElementRole

The associated role type for this element kind.
Source§

fn role(&self) -> Self::Role

Returns the general syntactic role of this element. Read more
Source§

fn is_role(&self, role: Self::Role) -> bool

Returns true if this element matches the specified language-specific role.
Source§

fn is_universal(&self, role: UniversalElementRole) -> bool

Returns true if this element matches the specified universal role.
Source§

fn is_root(&self) -> bool

Returns true if this element represents the root of the parsed tree.
Source§

fn is_error(&self) -> bool

Returns true if this element represents an error condition.
Source§

impl From<TclElementType> for TclTokenType

Source§

fn from(element: TclElementType) -> Self

Converts to this type from the input type.
Source§

impl From<TclTokenType> for TclElementType

Source§

fn from(token: TclTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for TclElementType

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 PartialEq for TclElementType

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for TclElementType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for TclElementType

Source§

impl Eq for TclElementType

Source§

impl StructuralPartialEq for TclElementType

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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 T
where 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 T
where T: Clone,

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,