Skip to main content

WatTokenType

Enum WatTokenType 

Source
#[repr(u8)]
pub enum WatTokenType {
Show 207 variants Whitespace = 0, Newline = 1, Comment = 2, Error = 3, Eof = 4, Text = 5, IntegerLiteral = 6, FloatLiteral = 7, StringLiteral = 8, Identifier = 9, ModuleKw = 10, FuncKw = 11, ExportKw = 12, ImportKw = 13, TypeKw = 14, ParamKw = 15, ResultKw = 16, LocalKw = 17, GlobalKw = 18, MemoryKw = 19, TableKw = 20, ElemKw = 21, DataKw = 22, StartKw = 23, BlockKw = 24, LoopKw = 25, IfKw = 26, ThenKw = 27, ElseKw = 28, EndKw = 29, BrKw = 30, BrIfKw = 31, BrTableKw = 32, ReturnKw = 33, CallKw = 34, CallIndirectKw = 35, LocalGetKw = 36, LocalSetKw = 37, LocalTeeKw = 38, GlobalGetKw = 39, GlobalSetKw = 40, I32LoadKw = 41, I64LoadKw = 42, F32LoadKw = 43, F64LoadKw = 44, I32Load8SKw = 45, I32Load8UKw = 46, I32Load16SKw = 47, I32Load16UKw = 48, I64Load8SKw = 49, I64Load8UKw = 50, I64Load16SKw = 51, I64Load16UKw = 52, I64Load32SKw = 53, I64Load32UKw = 54, I32StoreKw = 55, I64StoreKw = 56, F32StoreKw = 57, F64StoreKw = 58, I32Store8Kw = 59, I32Store16Kw = 60, I64Store8Kw = 61, I64Store16Kw = 62, I64Store32Kw = 63, MemorySizeKw = 64, MemoryGrowKw = 65, I32ConstKw = 66, I64ConstKw = 67, F32ConstKw = 68, F64ConstKw = 69, I32AddKw = 70, I64AddKw = 71, F32AddKw = 72, F64AddKw = 73, I32SubKw = 74, I64SubKw = 75, F32SubKw = 76, F64SubKw = 77, I32MulKw = 78, I64MulKw = 79, F32MulKw = 80, F64MulKw = 81, I32DivSKw = 82, I32DivUKw = 83, I64DivSKw = 84, I64DivUKw = 85, F32DivKw = 86, F64DivKw = 87, I32RemSKw = 88, I32RemUKw = 89, I64RemSKw = 90, I64RemUKw = 91, I32EqKw = 92, I64EqKw = 93, F32EqKw = 94, F64EqKw = 95, I32NeKw = 96, I64NeKw = 97, F32NeKw = 98, F64NeKw = 99, I32LtSKw = 100, I32LtUKw = 101, I64LtSKw = 102, I64LtUKw = 103, F32LtKw = 104, F64LtKw = 105, I32GtSKw = 106, I32GtUKw = 107, I64GtSKw = 108, I64GtUKw = 109, F32GtKw = 110, F64GtKw = 111, I32LeSKw = 112, I32LeUKw = 113, I64LeSKw = 114, I64LeUKw = 115, F32LeKw = 116, F64LeKw = 117, I32GeSKw = 118, I32GeUKw = 119, I64GeSKw = 120, I64GeUKw = 121, F32GeKw = 122, F64GeKw = 123, I32AndKw = 124, I64AndKw = 125, I32OrKw = 126, I64OrKw = 127, I32XorKw = 128, I64XorKw = 129, I32ShlKw = 130, I64ShlKw = 131, I32ShrSKw = 132, I32ShrUKw = 133, I64ShrSKw = 134, I64ShrUKw = 135, I32RotlKw = 136, I64RotlKw = 137, I32RotrKw = 138, I64RotrKw = 139, I32WrapI64Kw = 140, I64ExtendI32SKw = 141, I64ExtendI32UKw = 142, I32TruncF32SKw = 143, I32TruncF32UKw = 144, I32TruncF64SKw = 145, I32TruncF64UKw = 146, I64TruncF32SKw = 147, I64TruncF32UKw = 148, I64TruncF64SKw = 149, I64TruncF64UKw = 150, F32ConvertI32SKw = 151, F32ConvertI32UKw = 152, F32ConvertI64SKw = 153, F32ConvertI64UKw = 154, F64ConvertI32SKw = 155, F64ConvertI32UKw = 156, F64ConvertI64SKw = 157, F64ConvertI64UKw = 158, F32DemoteF64Kw = 159, F64PromoteF32Kw = 160, DropKw = 161, SelectKw = 162, UnreachableKw = 163, NopKw = 164, I32Kw = 165, I64Kw = 166, F32Kw = 167, F64Kw = 168, FuncrefKw = 169, ExternrefKw = 170, MutKw = 171, OffsetKw = 172, AlignKw = 173, LeftParen = 174, RightParen = 175, LeftBracket = 176, RightBracket = 177, LeftBrace = 178, RightBrace = 179, Semicolon = 180, Comma = 181, Dot = 182, Quote = 183, Dollar = 184, Plus = 185, Minus = 186, Star = 187, Slash = 188, Eq = 189, Colon = 190, Question = 191, Bang = 192, At = 193, Hash = 194, Percent = 195, Caret = 196, Ampersand = 197, LessThan = 198, GreaterThan = 199, Backslash = 200, Pipe = 201, Tilde = 202, Root = 203, SourceFile = 204, Module = 205, Item = 206,
}
Expand description

Token types for the WebAssembly Text (WAT) language.

Variants§

§

Whitespace = 0

Whitespace.

§

Newline = 1

Newline.

§

Comment = 2

Comment.

§

Error = 3

Error token.

§

Eof = 4

End of stream.

§

Text = 5

Plain text.

§

IntegerLiteral = 6

Integer literal.

§

FloatLiteral = 7

Floating-point literal.

§

StringLiteral = 8

String literal.

§

Identifier = 9

Identifier (starting with $).

§

ModuleKw = 10

module keyword.

§

FuncKw = 11

func keyword.

§

ExportKw = 12

export keyword.

§

ImportKw = 13

import keyword.

§

TypeKw = 14

type keyword.

§

ParamKw = 15

param keyword.

§

ResultKw = 16

result keyword.

§

LocalKw = 17

local keyword.

§

GlobalKw = 18

global keyword.

§

MemoryKw = 19

memory keyword.

§

TableKw = 20

table keyword.

§

ElemKw = 21

elem keyword.

§

DataKw = 22

data keyword.

§

StartKw = 23

start keyword.

§

BlockKw = 24

block keyword.

§

LoopKw = 25

loop keyword.

§

IfKw = 26

if keyword.

§

ThenKw = 27

then keyword.

§

ElseKw = 28

else keyword.

§

EndKw = 29

end keyword.

§

BrKw = 30

br keyword.

§

BrIfKw = 31

br_if keyword.

§

BrTableKw = 32

br_table keyword.

§

ReturnKw = 33

return keyword.

§

CallKw = 34

call keyword.

§

CallIndirectKw = 35

call_indirect keyword.

§

LocalGetKw = 36

local.get keyword.

§

LocalSetKw = 37

local.set keyword.

§

LocalTeeKw = 38

local.tee keyword.

§

GlobalGetKw = 39

global.get keyword.

§

GlobalSetKw = 40

global.set keyword.

§

I32LoadKw = 41

i32.load keyword.

§

I64LoadKw = 42

i64.load keyword.

§

F32LoadKw = 43

f32.load keyword.

§

F64LoadKw = 44

f64.load keyword.

§

I32Load8SKw = 45

i32.load8_s keyword.

§

I32Load8UKw = 46

i32.load8_u keyword.

§

I32Load16SKw = 47

i32.load16_s keyword.

§

I32Load16UKw = 48

i32.load16_u keyword.

§

I64Load8SKw = 49

i64.load8_s keyword.

§

I64Load8UKw = 50

i64.load8_u keyword.

§

I64Load16SKw = 51

i64.load16_s keyword.

§

I64Load16UKw = 52

i64.load16_u keyword.

§

I64Load32SKw = 53

i64.load32_s keyword.

§

I64Load32UKw = 54

i64.load32_u keyword.

§

I32StoreKw = 55

i32.store keyword.

§

I64StoreKw = 56

i64.store keyword.

§

F32StoreKw = 57

f32.store keyword.

§

F64StoreKw = 58

f64.store keyword.

§

I32Store8Kw = 59

i32.store8 keyword.

§

I32Store16Kw = 60

i32.store16 keyword.

§

I64Store8Kw = 61

i64.store8 keyword.

§

I64Store16Kw = 62

i64.store16 keyword.

§

I64Store32Kw = 63

i64.store32 keyword.

§

MemorySizeKw = 64

memory.size keyword.

§

MemoryGrowKw = 65

memory.grow keyword.

§

I32ConstKw = 66

i32.const keyword.

§

I64ConstKw = 67

i64.const keyword.

§

F32ConstKw = 68

f32.const keyword.

§

F64ConstKw = 69

f64.const keyword.

§

I32AddKw = 70

i32.add keyword.

§

I64AddKw = 71

i64.add keyword.

§

F32AddKw = 72

f32.add keyword.

§

F64AddKw = 73

f64.add keyword.

§

I32SubKw = 74

i32.sub keyword.

§

I64SubKw = 75

i64.sub keyword.

§

F32SubKw = 76

f32.sub keyword.

§

F64SubKw = 77

f64.sub keyword.

§

I32MulKw = 78

i32.mul keyword.

§

I64MulKw = 79

i64.mul keyword.

§

F32MulKw = 80

f32.mul keyword.

§

F64MulKw = 81

f64.mul keyword.

§

I32DivSKw = 82

i32.div_s keyword.

§

I32DivUKw = 83

i32.div_u keyword.

§

I64DivSKw = 84

i64.div_s keyword.

§

I64DivUKw = 85

i64.div_u keyword.

§

F32DivKw = 86

f32.div keyword.

§

F64DivKw = 87

f64.div keyword.

§

I32RemSKw = 88

i32.rem_s keyword.

§

I32RemUKw = 89

i32.rem_u keyword.

§

I64RemSKw = 90

i64.rem_s keyword.

§

I64RemUKw = 91

i64.rem_u keyword.

§

I32EqKw = 92

i32.eq keyword.

§

I64EqKw = 93

i64.eq keyword.

§

F32EqKw = 94

f32.eq keyword.

§

F64EqKw = 95

f64.eq keyword.

§

I32NeKw = 96

i32.ne keyword.

§

I64NeKw = 97

i64.ne keyword.

§

F32NeKw = 98

f32.ne keyword.

§

F64NeKw = 99

f64.ne keyword.

§

I32LtSKw = 100

i32.lt_s keyword.

§

I32LtUKw = 101

i32.lt_u keyword.

§

I64LtSKw = 102

i64.lt_s keyword.

§

I64LtUKw = 103

i64.lt_u keyword.

§

F32LtKw = 104

f32.lt keyword.

§

F64LtKw = 105

f64.lt keyword.

§

I32GtSKw = 106

i32.gt_s keyword.

§

I32GtUKw = 107

i32.gt_u keyword.

§

I64GtSKw = 108

i64.gt_s keyword.

§

I64GtUKw = 109

i64.gt_u keyword.

§

F32GtKw = 110

f32.gt keyword.

§

F64GtKw = 111

f64.gt keyword.

§

I32LeSKw = 112

i32.le_s keyword.

§

I32LeUKw = 113

i32.le_u keyword.

§

I64LeSKw = 114

i64.le_s keyword.

§

I64LeUKw = 115

i64.le_u keyword.

§

F32LeKw = 116

f32.le keyword.

§

F64LeKw = 117

f64.le keyword.

§

I32GeSKw = 118

i32.ge_s keyword.

§

I32GeUKw = 119

i32.ge_u keyword.

§

I64GeSKw = 120

i64.ge_s keyword.

§

I64GeUKw = 121

i64.ge_u keyword.

§

F32GeKw = 122

f32.ge keyword.

§

F64GeKw = 123

f64.ge keyword.

§

I32AndKw = 124

i32.and keyword.

§

I64AndKw = 125

i64.and keyword.

§

I32OrKw = 126

i32.or keyword.

§

I64OrKw = 127

i64.or keyword.

§

I32XorKw = 128

i32.xor keyword.

§

I64XorKw = 129

i64.xor keyword.

§

I32ShlKw = 130

i32.shl keyword.

§

I64ShlKw = 131

i64.shl keyword.

§

I32ShrSKw = 132

i32.shr_s keyword.

§

I32ShrUKw = 133

i32.shr_u keyword.

§

I64ShrSKw = 134

i64.shr_s keyword.

§

I64ShrUKw = 135

i64.shr_u keyword.

§

I32RotlKw = 136

i32.rotl keyword.

§

I64RotlKw = 137

i64.rotl keyword.

§

I32RotrKw = 138

i32.rotr keyword.

§

I64RotrKw = 139

i64.rotr keyword.

§

I32WrapI64Kw = 140

i32.wrap_i64 keyword.

§

I64ExtendI32SKw = 141

i64.extend_i32_s keyword.

§

I64ExtendI32UKw = 142

i64.extend_i32_u keyword.

§

I32TruncF32SKw = 143

i32.trunc_f32_s keyword.

§

I32TruncF32UKw = 144

i32.trunc_f32_u keyword.

§

I32TruncF64SKw = 145

i32.trunc_f64_s keyword.

§

I32TruncF64UKw = 146

i32.trunc_f64_u keyword.

§

I64TruncF32SKw = 147

i64.trunc_f32_s keyword.

§

I64TruncF32UKw = 148

i64.trunc_f32_u keyword.

§

I64TruncF64SKw = 149

i64.trunc_f64_s keyword.

§

I64TruncF64UKw = 150

i64.trunc_f64_u keyword.

§

F32ConvertI32SKw = 151

f32.convert_i32_s keyword.

§

F32ConvertI32UKw = 152

f32.convert_i32_u keyword.

§

F32ConvertI64SKw = 153

f32.convert_i64_s keyword.

§

F32ConvertI64UKw = 154

f32.convert_i64_u keyword.

§

F64ConvertI32SKw = 155

f64.convert_i32_s keyword.

§

F64ConvertI32UKw = 156

f64.convert_i32_u keyword.

§

F64ConvertI64SKw = 157

f64.convert_i64_s keyword.

§

F64ConvertI64UKw = 158

f64.convert_i64_u keyword.

§

F32DemoteF64Kw = 159

f32.demote_f64 keyword.

§

F64PromoteF32Kw = 160

f64.promote_f32 keyword.

§

DropKw = 161

drop keyword.

§

SelectKw = 162

select keyword.

§

UnreachableKw = 163

unreachable keyword.

§

NopKw = 164

nop keyword.

§

I32Kw = 165

i32 keyword.

§

I64Kw = 166

i64 keyword.

§

F32Kw = 167

f32 keyword.

§

F64Kw = 168

f64 keyword.

§

FuncrefKw = 169

funcref keyword.

§

ExternrefKw = 170

externref keyword.

§

MutKw = 171

mut keyword.

§

OffsetKw = 172

offset keyword.

§

AlignKw = 173

align keyword.

§

LeftParen = 174

(.

§

RightParen = 175

).

§

LeftBracket = 176

[.

§

RightBracket = 177

].

§

LeftBrace = 178

{.

§

RightBrace = 179

}.

§

Semicolon = 180

;.

§

Comma = 181

,.

§

Dot = 182

..

§

Quote = 183

".

§

Dollar = 184

$.

§

Plus = 185

+.

§

Minus = 186

-.

§

Star = 187

*.

§

Slash = 188

/.

§

Eq = 189

=.

§

Colon = 190

:.

§

Question = 191

?.

§

Bang = 192

!.

§

At = 193

@.

§

Hash = 194

#.

§

Percent = 195

%.

§

Caret = 196

^.

§

Ampersand = 197

&.

§

LessThan = 198

<.

§

GreaterThan = 199

>.

§

Backslash = 200

\.

§

Pipe = 201

|.

§

Tilde = 202

~.

§

Root = 203

Root node.

§

SourceFile = 204

Source file.

§

Module = 205

Module.

§

Item = 206

Item.

Trait Implementations§

Source§

impl Clone for WatTokenType

Source§

fn clone(&self) -> WatTokenType

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 WatTokenType

Source§

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

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

impl<'de> Deserialize<'de> for WatTokenType

Source§

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

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

impl From<WatTokenType> for WatElementType

Source§

fn from(token: WatTokenType) -> WatElementType

Converts to this type from the input type.
Source§

impl Hash for WatTokenType

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

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 WatTokenType

Source§

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

Source§

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

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

impl TokenType for WatTokenType

Source§

const END_OF_STREAM: WatTokenType = Self::Eof

A constant representing the end of the input stream.
Source§

type Role = UniversalTokenRole

The associated role type for this token kind.
Source§

fn is_ignored(&self) -> bool

Returns true if this token represents trivia (whitespace, comments, etc.).
Source§

fn role(&self) -> <WatTokenType as TokenType>::Role

Returns the general syntactic role of this token.
Source§

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

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

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

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

fn is_comment(&self) -> bool

Returns true if this token represents a comment.
Source§

fn is_whitespace(&self) -> bool

Returns true if this token represents whitespace.
Source§

fn is_error(&self) -> bool

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

fn is_end_of_stream(&self) -> bool

Returns true if this token represents the end of the input stream.
Source§

impl Copy for WatTokenType

Source§

impl Eq for WatTokenType

Source§

impl StructuralPartialEq for WatTokenType

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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