Skip to main content

ElixirElementType

Enum ElixirElementType 

Source
#[repr(u16)]
pub enum ElixirElementType {
Show 76 variants Root = 0, Whitespace = 1, Newline = 2, Comment = 3, Identifier = 4, Atom = 5, Variable = 6, Number = 7, Float = 8, String = 9, Character = 10, Sigil = 11, After = 12, And = 13, Case = 14, Catch = 15, Cond = 16, Def = 17, Defp = 18, Defmodule = 19, Defstruct = 20, Defprotocol = 21, Defimpl = 22, Defmacro = 23, Defmacrop = 24, Do = 25, Else = 26, Elsif = 27, End = 28, False = 29, Fn = 30, If = 31, In = 32, Not = 33, Or = 34, Receive = 35, Rescue = 36, True = 37, Try = 38, Unless = 39, When = 40, With = 41, Plus = 42, Minus = 43, Mul = 44, Div = 45, Dot = 46, Comma = 47, Semicolon = 48, Colon = 49, LeftParen = 50, RightParen = 51, LeftBrace = 52, RightBrace = 53, LeftBracket = 54, RightBracket = 55, Arrow = 56, Pipe = 57, ModuleDefinition = 58, FunctionDefinition = 59, CallExpression = 60, BinaryExpression = 61, UnaryExpression = 62, LiteralExpression = 63, IdentifierExpression = 64, AttributeExpression = 65, AccessExpression = 66, ListLiteral = 67, TupleLiteral = 68, MapLiteral = 69, KeywordLiteral = 70, BlockExpression = 71, MatchExpression = 72, At = 73, Percent = 74, Error = 75,
}
Expand description

Element types for Elixir AST.

Variants§

§

Root = 0

Root element.

§

Whitespace = 1

Whitespace.

§

Newline = 2

Newline.

§

Comment = 3

Comment.

§

Identifier = 4

Identifier.

§

Atom = 5

Atom.

§

Variable = 6

Variable.

§

Number = 7

Number.

§

Float = 8

Float.

§

String = 9

String.

§

Character = 10

Character.

§

Sigil = 11

Sigil.

§

After = 12

after

§

And = 13

and

§

Case = 14

case

§

Catch = 15

catch

§

Cond = 16

cond

§

Def = 17

def

§

Defp = 18

defp

§

Defmodule = 19

defmodule

§

Defstruct = 20

defstruct

§

Defprotocol = 21

defprotocol

§

Defimpl = 22

defimpl

§

Defmacro = 23

defmacro

§

Defmacrop = 24

defmacrop

§

Do = 25

do

§

Else = 26

else

§

Elsif = 27

elsif

§

End = 28

end

§

False = 29

false

§

Fn = 30

fn

§

If = 31

if

§

In = 32

in

§

Not = 33

not

§

Or = 34

or

§

Receive = 35

receive

§

Rescue = 36

rescue

§

True = 37

true

§

Try = 38

try

§

Unless = 39

unless

§

When = 40

when

§

With = 41

with

§

Plus = 42

+

§

Minus = 43

-

§

Mul = 44

*

§

Div = 45

/

§

Dot = 46

.

§

Comma = 47

,

§

Semicolon = 48

;

§

Colon = 49

:

§

LeftParen = 50

(

§

RightParen = 51

)

§

LeftBrace = 52

{

§

RightBrace = 53

}

§

LeftBracket = 54

[

§

RightBracket = 55

]

§

Arrow = 56

->

§

Pipe = 57

|

§

ModuleDefinition = 58

Module definition.

§

FunctionDefinition = 59

Function definition.

§

CallExpression = 60

Call expression.

§

BinaryExpression = 61

Binary expression.

§

UnaryExpression = 62

Unary expression.

§

LiteralExpression = 63

Literal expression.

§

IdentifierExpression = 64

Identifier expression.

§

AttributeExpression = 65

Attribute expression.

§

AccessExpression = 66

Access expression.

§

ListLiteral = 67

List literal.

§

TupleLiteral = 68

Tuple literal.

§

MapLiteral = 69

Map literal.

§

KeywordLiteral = 70

Keyword literal.

§

BlockExpression = 71

Block expression.

§

MatchExpression = 72

Match expression.

§

At = 73

@

§

Percent = 74

%

§

Error = 75

Error element.

Trait Implementations§

Source§

impl Clone for ElixirElementType

Source§

fn clone(&self) -> ElixirElementType

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 ElixirElementType

Source§

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

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

impl<'de> Deserialize<'de> for ElixirElementType

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 ElixirElementType

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.
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<ElixirTokenType> for ElixirElementType

Source§

fn from(t: ElixirTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for ElixirElementType

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 ElixirElementType

Source§

fn eq(&self, other: &ElixirElementType) -> 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 ElixirElementType

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 ElixirElementType

Source§

impl Eq for ElixirElementType

Source§

impl StructuralPartialEq for ElixirElementType

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