Skip to main content

PowerShellTokenType

Enum PowerShellTokenType 

Source
#[repr(u8)]
pub enum PowerShellTokenType {
Show 124 variants Whitespace = 0, Newline = 1, Comment = 2, Begin = 3, Break = 4, Catch = 5, Class = 6, Continue = 7, Data = 8, Define = 9, Do = 10, DynamicParam = 11, Else = 12, ElseIf = 13, End = 14, Exit = 15, Filter = 16, Finally = 17, For = 18, ForEach = 19, From = 20, Function = 21, If = 22, In = 23, Param = 24, Process = 25, Return = 26, Switch = 27, Throw = 28, Trap = 29, Try = 30, Until = 31, Using = 32, Var = 33, While = 34, Workflow = 35, Plus = 36, Minus = 37, Multiply = 38, Divide = 39, Modulo = 40, Equal = 41, NotEqual = 42, GreaterThan = 43, LessThan = 44, GreaterEqual = 45, LessEqual = 46, Like = 47, NotLike = 48, Match = 49, NotMatch = 50, Contains = 51, NotContains = 52, NotIn = 53, Replace = 54, Split = 55, Join = 56, Is = 57, IsNot = 58, As = 59, And = 60, Or = 61, Xor = 62, Not = 63, Band = 64, Bor = 65, Bxor = 66, Bnot = 67, Shl = 68, Shr = 69, LeftParen = 70, RightParen = 71, LeftBrace = 72, RightBrace = 73, LeftBracket = 74, RightBracket = 75, Semicolon = 76, Comma = 77, Dot = 78, DotDot = 79, Colon = 80, DoubleColon = 81, Pipe = 82, Ampersand = 83, At = 84, Dollar = 85, Question = 86, Exclamation = 87, Backtick = 88, SingleQuote = 89, DoubleQuote = 90, StringLiteral = 91, NumberLiteral = 92, BooleanLiteral = 93, NullLiteral = 94, ArrayLiteral = 95, HashLiteral = 96, Identifier = 97, Variable = 98, AutomaticVariable = 99, PreferenceVariable = 100, Root = 101, FunctionDef = 102, ClassDef = 103, IfStatement = 104, ForStatement = 105, ForEachStatement = 106, WhileStatement = 107, DoWhileStatement = 108, SwitchStatement = 109, TryStatement = 110, CatchBlock = 111, FinallyBlock = 112, ParamBlock = 113, ProcessBlock = 114, BeginBlock = 115, EndBlock = 116, ExpressionStatement = 117, Pipeline = 118, Command = 119, CommandParameter = 120, CommandArgument = 121, Error = 122, Eof = 123,
}
Expand description

Token types for the PowerShell language.

Variants§

§

Whitespace = 0

Whitespace.

§

Newline = 1

A newline.

§

Comment = 2

A comment.

§

Begin = 3

begin keyword.

§

Break = 4

break keyword.

§

Catch = 5

catch keyword.

§

Class = 6

class keyword.

§

Continue = 7

continue keyword.

§

Data = 8

data keyword.

§

Define = 9

define keyword.

§

Do = 10

do keyword.

§

DynamicParam = 11

dynamicparam keyword.

§

Else = 12

else keyword.

§

ElseIf = 13

elseif keyword.

§

End = 14

end keyword.

§

Exit = 15

exit keyword.

§

Filter = 16

filter keyword.

§

Finally = 17

finally keyword.

§

For = 18

for keyword.

§

ForEach = 19

foreach keyword.

§

From = 20

from keyword.

§

Function = 21

function keyword.

§

If = 22

if keyword.

§

In = 23

in keyword.

§

Param = 24

param keyword.

§

Process = 25

process keyword.

§

Return = 26

return keyword.

§

Switch = 27

switch keyword.

§

Throw = 28

throw keyword.

§

Trap = 29

trap keyword.

§

Try = 30

try keyword.

§

Until = 31

until keyword.

§

Using = 32

using keyword.

§

Var = 33

var keyword.

§

While = 34

while keyword.

§

Workflow = 35

workflow keyword.

§

Plus = 36

+.

§

Minus = 37

-.

§

Multiply = 38

*.

§

Divide = 39

/.

§

Modulo = 40

%.

§

Equal = 41

=.

§

NotEqual = 42

!=.

§

GreaterThan = 43

>.

§

LessThan = 44

<.

§

GreaterEqual = 45

>=.

§

LessEqual = 46

<=.

§

Like = 47

-like.

§

NotLike = 48

-notlike.

§

Match = 49

-match.

§

NotMatch = 50

-notmatch.

§

Contains = 51

-contains.

§

NotContains = 52

-notcontains.

§

NotIn = 53

-notin.

§

Replace = 54

-replace.

§

Split = 55

-split.

§

Join = 56

-join.

§

Is = 57

-is.

§

IsNot = 58

-isnot.

§

As = 59

-as.

§

And = 60

-and.

§

Or = 61

-or.

§

Xor = 62

-xor.

§

Not = 63

-not.

§

Band = 64

-band.

§

Bor = 65

-bor.

§

Bxor = 66

-bxor.

§

Bnot = 67

-bnot.

§

Shl = 68

-shl.

§

Shr = 69

-shr.

§

LeftParen = 70

(.

§

RightParen = 71

).

§

LeftBrace = 72

{.

§

RightBrace = 73

}.

§

LeftBracket = 74

[.

§

RightBracket = 75

].

§

Semicolon = 76

;.

§

Comma = 77

,.

§

Dot = 78

..

§

DotDot = 79

...

§

Colon = 80

:.

§

DoubleColon = 81

::.

§

Pipe = 82

|.

§

Ampersand = 83

&.

§

At = 84

@.

§

Dollar = 85

$.

§

Question = 86

?.

§

Exclamation = 87

!.

§

Backtick = 88

`.

§

SingleQuote = 89

'.

§

DoubleQuote = 90

".

§

StringLiteral = 91

A string literal.

§

NumberLiteral = 92

A number literal.

§

BooleanLiteral = 93

A boolean literal.

§

NullLiteral = 94

A null literal.

§

ArrayLiteral = 95

An array literal.

§

HashLiteral = 96

A hash literal.

§

Identifier = 97

An identifier.

§

Variable = 98

A variable.

§

AutomaticVariable = 99

An automatic variable.

§

PreferenceVariable = 100

A preference variable.

§

Root = 101

Root node of the AST.

§

FunctionDef = 102

A function definition.

§

ClassDef = 103

A class definition.

§

IfStatement = 104

An if statement.

§

ForStatement = 105

A for statement.

§

ForEachStatement = 106

A foreach statement.

§

WhileStatement = 107

A while statement.

§

DoWhileStatement = 108

A do-while statement.

§

SwitchStatement = 109

A switch statement.

§

TryStatement = 110

A try statement.

§

CatchBlock = 111

A catch block.

§

FinallyBlock = 112

A finally block.

§

ParamBlock = 113

A param block.

§

ProcessBlock = 114

A process block.

§

BeginBlock = 115

A begin block.

§

EndBlock = 116

An end block.

§

ExpressionStatement = 117

An expression statement.

§

Pipeline = 118

A pipeline.

§

Command = 119

A command.

§

CommandParameter = 120

A command parameter.

§

CommandArgument = 121

A command argument.

§

Error = 122

An error token.

§

Eof = 123

End of stream.

Trait Implementations§

Source§

impl Clone for PowerShellTokenType

Source§

fn clone(&self) -> PowerShellTokenType

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 PowerShellTokenType

Source§

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

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

impl<'de> Deserialize<'de> for PowerShellTokenType

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 From<PowerShellTokenType> for PowerShellElementType

Source§

fn from(token: PowerShellTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for PowerShellTokenType

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 PowerShellTokenType

Source§

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

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 TokenType for PowerShellTokenType

Source§

const END_OF_STREAM: Self = 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) -> Self::Role

Returns the general syntactic role of this token. Read more
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 PowerShellTokenType

Source§

impl Eq for PowerShellTokenType

Source§

impl StructuralPartialEq for PowerShellTokenType

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>,