Skip to main content

MatlabElementType

Enum MatlabElementType 

Source
#[repr(u8)]
pub enum MatlabElementType {
Show 75 variants Whitespace = 0, Newline = 1, Comment = 2, BlockComment = 3, Identifier = 4, Number = 5, String = 6, Character = 7, Function = 8, End = 9, If = 10, Else = 11, Elseif = 12, While = 13, For = 14, Break = 15, Continue = 16, Return = 17, Switch = 18, Case = 19, Otherwise = 20, Try = 21, Catch = 22, Global = 23, Persistent = 24, Classdef = 25, Properties = 26, Methods = 27, Events = 28, Plus = 29, Minus = 30, Times = 31, Divide = 32, Power = 33, LeftDivide = 34, DotTimes = 35, DotDivide = 36, DotPower = 37, DotLeftDivide = 38, Equal = 39, NotEqual = 40, Less = 41, Greater = 42, LessEqual = 43, GreaterEqual = 44, And = 45, Or = 46, Not = 47, AndAnd = 48, OrOr = 49, Assign = 50, LeftParen = 51, RightParen = 52, LeftBracket = 53, RightBracket = 54, LeftBrace = 55, RightBrace = 56, Semicolon = 57, Comma = 58, Dot = 59, Colon = 60, Question = 61, At = 62, Transpose = 63, DotTranspose = 64, Operator = 65, Delimiter = 66, Error = 67, Script = 68, FunctionDef = 69, ClassDef = 70, Block = 71, Expression = 72, Statement = 73, Eof = 74,
}
Expand description

Element types for the Matlab language.

Variants§

§

Whitespace = 0

Whitespace.

§

Newline = 1

Newline.

§

Comment = 2

Line comment.

§

BlockComment = 3

Block comment.

§

Identifier = 4

Identifier.

§

Number = 5

Number literal.

§

String = 6

String literal.

§

Character = 7

Character literal.

§

Function = 8

function keyword.

§

End = 9

end keyword.

§

If = 10

if keyword.

§

Else = 11

else keyword.

§

Elseif = 12

elseif keyword.

§

While = 13

while keyword.

§

For = 14

for keyword.

§

Break = 15

break keyword.

§

Continue = 16

continue keyword.

§

Return = 17

return keyword.

§

Switch = 18

switch keyword.

§

Case = 19

case keyword.

§

Otherwise = 20

otherwise keyword.

§

Try = 21

try keyword.

§

Catch = 22

catch keyword.

§

Global = 23

global keyword.

§

Persistent = 24

persistent keyword.

§

Classdef = 25

classdef keyword.

§

Properties = 26

properties keyword.

§

Methods = 27

methods keyword.

§

Events = 28

events keyword.

§

Plus = 29

+ operator.

§

Minus = 30

- operator.

§

Times = 31

* operator.

§

Divide = 32

/ operator.

§

Power = 33

^ operator.

§

LeftDivide = 34

\ operator.

§

DotTimes = 35

.* operator.

§

DotDivide = 36

./ operator.

§

DotPower = 37

.^ operator.

§

DotLeftDivide = 38

.\ operator.

§

Equal = 39

== operator.

§

NotEqual = 40

~= operator.

§

Less = 41

< operator.

§

Greater = 42

> operator.

§

LessEqual = 43

<= operator.

§

GreaterEqual = 44

>= operator.

§

And = 45

& operator.

§

Or = 46

| operator.

§

Not = 47

~ operator.

§

AndAnd = 48

&& operator.

§

OrOr = 49

|| operator.

§

Assign = 50

= operator.

§

LeftParen = 51

( delimiter.

§

RightParen = 52

) delimiter.

§

LeftBracket = 53

[ delimiter.

§

RightBracket = 54

] delimiter.

§

LeftBrace = 55

{ delimiter.

§

RightBrace = 56

} delimiter.

§

Semicolon = 57

; delimiter.

§

Comma = 58

, delimiter.

§

Dot = 59

. delimiter.

§

Colon = 60

: delimiter.

§

Question = 61

? delimiter.

§

At = 62

@ delimiter.

§

Transpose = 63

' operator.

§

DotTranspose = 64

.' operator.

§

Operator = 65

General operator.

§

Delimiter = 66

General delimiter.

§

Error = 67

Error element.

§

Script = 68

Script element.

§

FunctionDef = 69

Function definition element.

§

ClassDef = 70

Class definition element.

§

Block = 71

Block element.

§

Expression = 72

Expression element.

§

Statement = 73

Statement element.

§

Eof = 74

End of stream.

Implementations§

Source§

impl MatlabElementType

Source

pub fn is_token(&self) -> bool

Returns true if the element type is a token.

Source

pub fn is_element(&self) -> bool

Returns true if the element type is an element.

Trait Implementations§

Source§

impl Clone for MatlabElementType

Source§

fn clone(&self) -> MatlabElementType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MatlabElementType

Source§

impl Debug for MatlabElementType

Source§

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

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

impl<'de> Deserialize<'de> for MatlabElementType

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 MatlabElementType

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 Eq for MatlabElementType

Source§

impl From<MatlabTokenType> for MatlabElementType

Source§

fn from(token: MatlabTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for MatlabElementType

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 MatlabElementType

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 MatlabElementType

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 StructuralPartialEq for MatlabElementType

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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