PSTokenType Enum

Definition

PowerShell token types.

public enum class PSTokenType
public enum PSTokenType
type PSTokenType = 
Public Enum PSTokenType
Inheritance
PSTokenType

Fields

Attribute 9

Attributes.

For example, Mandatory in

param([Mandatory] $a)

Command 1

Command.

CommandArgument 3

Command Argument.

For example, 'foo' in

get-process -name foo

CommandParameter 2

Command Parameter.

For example, '-name' in

get-process -name foo

Comment 15

Comment.

For example, #here in

#here
if ($a -gt 4)
{
    $a++;
}

GroupEnd 13

Group Ender.

For example, } in

if ($a -gt 4)
{
    $a++;
}

GroupStart 12

Group Starter.

For example, { in

if ($a -gt 4)
{
    $a++;
}

Keyword 14

Keyword.

For example, if in

if ($a -gt 4)
{
    $a++;
}

LineContinuation 18

Line continuation.

For example, ` in

get-command -name `
foo

LoopLabel 8

Loop label.

Member 7

Property name or method name.

For example, Name in

$a.Name

NewLine 17

New line. This is '\n'

For example, \n in

#here
if ($a -gt 4)
{
    $a++;
}

Number 4

Number.

For example, 12 in

$a=12

Operator 11

Operators.

For example, + in

$a = 1 + 2

Position 19

Position token.

Position tokens are bogus tokens generated for identifying a location in the script.

StatementSeparator 16

Statement separator. This is ';'

For example, ; in

#here
if ($a -gt 4)
{
    $a++;
}

String 5

String.

For example, "12" in

$a="12"

Type 10

Types.

For example, [string] in

$a = [string] 12

Unknown 0

Unknown token.

Variable 6

Variable.

Applies to