Compartilhar via


TokenFlags Enum

Definition

Flags that specify additional information about a given token.

This enumeration supports a bitwise combination of its member values.

public enum class TokenFlags
[System.Flags]
public enum TokenFlags
[<System.Flags>]
type TokenFlags = 
Public Enum TokenFlags
Inheritance
TokenFlags
Attributes

Fields

Name Value Description
None 0

The token has no flags.

BinaryPrecedenceLogical 1

The precedence of the logical operators '-and', '-or', and '-xor'.

BinaryPrecedenceBitwise 2

The precedence of the bitwise operators '-band', '-bor', and '-bxor'

BinaryPrecedenceComparison 3

The precedence of comparison operators including: '-eq', '-ne', '-ge', '-gt', '-lt', '-le', '-like', '-notlike', '-match', '-notmatch', '-replace', '-contains', '-notcontains', '-in', '-notin', '-split', '-join', '-is', '-isnot', '-as', and all of the case sensitive variants of these operators, if they exists.

BinaryPrecedenceAdd 4

The precedence of the binary operators '+' and '-'.

BinaryPrecedenceMultiply 5

The precedence of the operators '*', '/', and '%'.

BinaryPrecedenceFormat 6

The precedence of the '-f' operator.

BinaryPrecedenceCoalesce 7

The precedence of null coalesce operator '??'.

BinaryPrecedenceMask 7

A bitmask to get the precedence of binary operators.

BinaryPrecedenceRange 7

The precedence of the '..' operator.

Keyword 16

The token is a keyword.

ScriptBlockBlockName 32

The token is one of the keywords that is a part of a script block: 'begin', 'process', 'end', 'clean', or 'dynamicparam'.

BinaryOperator 256

The token is a binary operator.

UnaryOperator 512

The token is a unary operator.

CaseSensitiveOperator 1024

The token is a case sensitive operator such as '-ceq' or '-ccontains'.

TernaryOperator 2048

The token is a ternary operator '?'.

SpecialOperator 4096

The operators '&', '|', and the member access operators ':' and '::'.

AssignmentOperator 8192

The token is one of the assignment operators: '=', '+=', '-=', '*=', '/=', '%=' or '??='

ParseModeInvariant 32768

The token is scanned identically in expression mode or command mode.

TokenInError 65536

The token has some error associated with it. For example, it may be a string missing it's terminator.

DisallowedInRestrictedMode 131072

The operator is not allowed in restricted language mode or in the data language.

PrefixOrPostfixOperator 262144

The token is either a prefix or postfix '++' or '--'.

CommandName 524288

The token names a command in a pipeline.

MemberName 1048576

The token names a member of a class.

TypeName 2097152

The token names a type.

AttributeName 4194304

The token names an attribute.

CanConstantFold 8388608

The token is a valid operator to use when doing constant folding.

StatementDoesntSupportAttributes 16777216

The token is a statement but does not support attributes.

Applies to