Skip to main content

SyntaxKind

Enum SyntaxKind 

Source
#[repr(u16)]
pub enum SyntaxKind {
Show 305 variants Root = 0, ModuleStatement = 1, ClassStatement = 2, SubStatement = 3, FunctionStatement = 4, PropertyStatement = 5, DeclareStatement = 6, EventStatement = 7, ImplementsStatement = 8, DefTypeStatement = 9, DimStatement = 10, ReDimStatement = 11, EraseStatement = 12, ConstStatement = 13, TypeStatement = 14, EnumStatement = 15, IfStatement = 16, ElseIfClause = 17, ElseClause = 18, ForStatement = 19, ForEachStatement = 20, WhileStatement = 21, DoStatement = 22, SelectCaseStatement = 23, CaseClause = 24, CaseElseClause = 25, WithStatement = 26, CallStatement = 27, RaiseEventStatement = 28, SetStatement = 29, LetStatement = 30, AssignmentStatement = 31, GotoStatement = 32, GoSubStatement = 33, ReturnStatement = 34, ResumeStatement = 35, ExitStatement = 36, OnErrorStatement = 37, OnGoToStatement = 38, OnGoSubStatement = 39, AppActivateStatement = 40, BeepStatement = 41, ChDirStatement = 42, ChDriveStatement = 43, CloseStatement = 44, DateStatement = 45, DeleteSettingStatement = 46, ResetStatement = 47, SavePictureStatement = 48, SaveSettingStatement = 49, SeekStatement = 50, SendKeysStatement = 51, SetAttrStatement = 52, StopStatement = 53, TimeStatement = 54, RandomizeStatement = 55, ErrorStatement = 56, FileCopyStatement = 57, GetStatement = 58, PutStatement = 59, InputStatement = 60, LineInputStatement = 61, KillStatement = 62, LoadStatement = 63, UnloadStatement = 64, LockStatement = 65, UnlockStatement = 66, LSetStatement = 67, RSetStatement = 68, MidStatement = 69, MidBStatement = 70, MkDirStatement = 71, RmDirStatement = 72, NameStatement = 73, OpenStatement = 74, PrintStatement = 75, WidthStatement = 76, WriteStatement = 77, LabelStatement = 78, AttributeStatement = 79, OptionStatement = 80, ObjectStatement = 81, VersionStatement = 82, PropertiesBlock = 83, PropertiesType = 84, PropertiesName = 85, Property = 86, PropertyKey = 87, PropertyValue = 88, PropertyGroup = 89, PropertyGroupName = 90, BinaryExpression = 91, UnaryExpression = 92, LiteralExpression = 93, IdentifierExpression = 94, MemberAccessExpression = 95, CallExpression = 96, ParenthesizedExpression = 97, NumericLiteralExpression = 98, StringLiteralExpression = 99, BooleanLiteralExpression = 100, AddressOfExpression = 101, TypeOfExpression = 102, NewExpression = 103, ArgumentList = 104, ParameterList = 105, Parameter = 106, Argument = 107, StatementList = 108, Whitespace = 1_000, Newline = 1001, EndOfLineComment = 1002, RemComment = 1003, ClassKeyword = 1004, ReDimKeyword = 1005, PreserveKeyword = 1006, DimKeyword = 1007, DeclareKeyword = 1008, AliasKeyword = 1009, AttributeKeyword = 1010, BeginKeyword = 1011, LibKeyword = 1012, WithKeyword = 1013, WithEventsKeyword = 1014, BaseKeyword = 1015, CompareKeyword = 1016, OptionKeyword = 1017, ExplicitKeyword = 1018, PrivateKeyword = 1019, PublicKeyword = 1020, ConstKeyword = 1021, AsKeyword = 1022, ByValKeyword = 1023, ByRefKeyword = 1024, OptionalKeyword = 1025, FunctionKeyword = 1026, StaticKeyword = 1027, SubKeyword = 1028, EndKeyword = 1029, TrueKeyword = 1030, FalseKeyword = 1031, EnumKeyword = 1032, TypeKeyword = 1033, BooleanKeyword = 1034, DoubleKeyword = 1035, CurrencyKeyword = 1036, DecimalKeyword = 1037, DateKeyword = 1038, ObjectKeyword = 1039, VariantKeyword = 1040, ByteKeyword = 1041, LongKeyword = 1042, SingleKeyword = 1043, StringKeyword = 1044, IntegerKeyword = 1045, IfKeyword = 1046, ElseKeyword = 1047, ElseIfKeyword = 1048, AndKeyword = 1049, OrKeyword = 1050, XorKeyword = 1051, ModKeyword = 1052, EqvKeyword = 1053, AddressOfKeyword = 1054, ImpKeyword = 1055, IsKeyword = 1056, LikeKeyword = 1057, NotKeyword = 1058, ThenKeyword = 1059, GotoKeyword = 1060, GoSubKeyword = 1061, ReturnKeyword = 1062, ExitKeyword = 1063, ForKeyword = 1064, EachKeyword = 1065, InKeyword = 1066, ToKeyword = 1067, LockKeyword = 1068, UnlockKeyword = 1069, StepKeyword = 1070, StopKeyword = 1071, WhileKeyword = 1072, WendKeyword = 1073, WidthKeyword = 1074, WriteKeyword = 1075, TimeKeyword = 1076, SetAttrKeyword = 1077, SetKeyword = 1078, SendKeysKeyword = 1079, SelectKeyword = 1080, CaseKeyword = 1081, SeekKeyword = 1082, SaveSettingKeyword = 1083, SavePictureKeyword = 1084, RSetKeyword = 1085, RmDirKeyword = 1086, ResumeKeyword = 1087, ResetKeyword = 1088, RandomizeKeyword = 1089, RaiseEventKeyword = 1090, PutKeyword = 1091, PropertyKeyword = 1092, PrintKeyword = 1093, OpenKeyword = 1094, OnKeyword = 1095, OffKeyword = 1096, NameKeyword = 1097, MkDirKeyword = 1098, MidKeyword = 1099, MidBKeyword = 1100, LSetKeyword = 1101, LoadKeyword = 1102, UnloadKeyword = 1103, LineKeyword = 1104, InputKeyword = 1105, LetKeyword = 1106, KillKeyword = 1107, ImplementsKeyword = 1108, GetKeyword = 1109, FileCopyKeyword = 1110, EventKeyword = 1111, ErrorKeyword = 1112, EraseKeyword = 1113, DoKeyword = 1114, UntilKeyword = 1115, DeleteSettingKeyword = 1116, DefBoolKeyword = 1117, DefByteKeyword = 1118, DefIntKeyword = 1119, DefLngKeyword = 1120, DefCurKeyword = 1121, DefSngKeyword = 1122, DefDblKeyword = 1123, DefDecKeyword = 1124, DefDateKeyword = 1125, DefStrKeyword = 1126, DefObjKeyword = 1127, DefVarKeyword = 1128, CloseKeyword = 1129, ChDriveKeyword = 1130, ChDirKeyword = 1131, CallKeyword = 1132, BeepKeyword = 1133, AppActivateKeyword = 1134, FriendKeyword = 1135, BinaryKeyword = 1136, RandomKeyword = 1137, ReadKeyword = 1138, OutputKeyword = 1139, AppendKeyword = 1140, AccessKeyword = 1141, TextKeyword = 1142, DatabaseKeyword = 1143, EmptyKeyword = 1144, ModuleKeyword = 1145, NextKeyword = 1146, NewKeyword = 1147, LenKeyword = 1148, MeKeyword = 1149, NullKeyword = 1150, ParamArrayKeyword = 1151, VersionKeyword = 1152, LoopKeyword = 1153, NothingKeyword = 1154, AnyKeyword = 1155, Identifier = 1156, StringLiteral = 1157, IntegerLiteral = 1158, LongLiteral = 1159, SingleLiteral = 1160, DoubleLiteral = 1161, DecimalLiteral = 1162, CurrencyLiteral = 1163, DateLiteral = 1164, DollarSign = 1165, Underscore = 1166, Ampersand = 1167, Percent = 1168, Octothorpe = 1169, LeftParenthesis = 1170, RightParenthesis = 1171, LeftCurlyBrace = 1172, RightCurlyBrace = 1173, LeftSquareBracket = 1174, RightSquareBracket = 1175, Comma = 1176, Semicolon = 1177, AtSign = 1178, ExclamationMark = 1179, EqualityOperator = 1180, InequalityOperator = 1181, LessThanOrEqualOperator = 1182, GreaterThanOrEqualOperator = 1183, LessThanOperator = 1184, GreaterThanOperator = 1185, MultiplicationOperator = 1186, SubtractionOperator = 1187, AdditionOperator = 1188, DivisionOperator = 1189, BackwardSlashOperator = 1190, PeriodOperator = 1191, ColonOperator = 1192, ExponentiationOperator = 1193, Error = 1194, Unknown = 1195,
}
Expand description

Syntax kinds for the VB6 CST.

This enum represents all possible node and token types in the CST.

Variants§

§

Root = 0

Root node of the syntax tree

§

ModuleStatement = 1

Module definition statement

§

ClassStatement = 2

Class definition statement

§

SubStatement = 3

Sub procedure statement

§

FunctionStatement = 4

Function procedure statement

§

PropertyStatement = 5

Property procedure statement

§

DeclareStatement = 6

Declare statement

§

EventStatement = 7

Event declaration statement

§

ImplementsStatement = 8

Implements statement

§

DefTypeStatement = 9

DefType statement

§

DimStatement = 10

Dim statement

§

ReDimStatement = 11

ReDim statement

§

EraseStatement = 12

Erase statement

§

ConstStatement = 13

Const statement

§

TypeStatement = 14

Type statement

§

EnumStatement = 15

Enum statement

§

IfStatement = 16

If statement

§

ElseIfClause = 17

ElseIf clause of an If statement

§

ElseClause = 18

Else clause of an If statement

§

ForStatement = 19

For statement

§

ForEachStatement = 20

For Each statement

§

WhileStatement = 21

While statement

§

DoStatement = 22

Do statement

§

SelectCaseStatement = 23

Select Case statement

§

CaseClause = 24

Case clause of a Select Case statement

§

CaseElseClause = 25

Case Else clause of a Select Case statement

§

WithStatement = 26

With statement

§

CallStatement = 27

Call statement

§

RaiseEventStatement = 28

RaiseEvent statement

§

SetStatement = 29

Set statement

§

LetStatement = 30

Let statement

§

AssignmentStatement = 31

Assignment statement

§

GotoStatement = 32

Goto statement

§

GoSubStatement = 33

GoSub statement

§

ReturnStatement = 34

Return statement

§

ResumeStatement = 35

Resume statement

§

ExitStatement = 36

Exit statement

§

OnErrorStatement = 37

On Error statement

§

OnGoToStatement = 38

On GoTo statement

§

OnGoSubStatement = 39

On GoSub statement

§

AppActivateStatement = 40

AppActivate statement

§

BeepStatement = 41

Beep statement

§

ChDirStatement = 42

ChDir statement

§

ChDriveStatement = 43

ChDrive statement

§

CloseStatement = 44

Close statement

§

DateStatement = 45

Date statement

§

DeleteSettingStatement = 46

DeleteSetting statement

§

ResetStatement = 47

Reset statement

§

SavePictureStatement = 48

SavePicture statement

§

SaveSettingStatement = 49

SaveSetting statement

§

SeekStatement = 50

Seek statement

§

SendKeysStatement = 51

SendKeys statement

§

SetAttrStatement = 52

SetAttr statement

§

StopStatement = 53

Stop statement

§

TimeStatement = 54

Time statement

§

RandomizeStatement = 55

Randomize statement

§

ErrorStatement = 56

Error statement

§

FileCopyStatement = 57

FileCopy statement

§

GetStatement = 58

Get statement

§

PutStatement = 59

Put statement

§

InputStatement = 60

Input statement

§

LineInputStatement = 61

LineInput statement

§

KillStatement = 62

Kill statement

§

LoadStatement = 63

Load statement

§

UnloadStatement = 64

Unload statement

§

LockStatement = 65

Lock statement

§

UnlockStatement = 66

Unlock statement

§

LSetStatement = 67

LSet statement

§

RSetStatement = 68

RSet statement

§

MidStatement = 69

Mid statement

§

MidBStatement = 70

MidB statement

§

MkDirStatement = 71

MkDir statement

§

RmDirStatement = 72

RmDir statement

§

NameStatement = 73

Name statement

§

OpenStatement = 74

Open statement

§

PrintStatement = 75

Print statement

§

WidthStatement = 76

Width statement

§

WriteStatement = 77

Write statement

§

LabelStatement = 78

Label statement

§

AttributeStatement = 79

Attribute statement

§

OptionStatement = 80

Option statement

§

ObjectStatement = 81

Object statement

§

VersionStatement = 82

Version statement

§

PropertiesBlock = 83

Properties block

§

PropertiesType = 84

Properties type declaration

§

PropertiesName = 85

Properties name declaration

§

Property = 86

Property Statement

§

PropertyKey = 87

Property key

§

PropertyValue = 88

Property value

§

PropertyGroup = 89

Property group

§

PropertyGroupName = 90

Property group name

§

BinaryExpression = 91

Binary expression

§

UnaryExpression = 92

Unary expression

§

LiteralExpression = 93

Literal expression

§

IdentifierExpression = 94

Identifier expression

§

MemberAccessExpression = 95

Member access expression

§

CallExpression = 96

Call expression

§

ParenthesizedExpression = 97

Parenthesized expression

§

NumericLiteralExpression = 98

Numeric literal expression

§

StringLiteralExpression = 99

String literal expression

§

BooleanLiteralExpression = 100

Boolean literal expression

§

AddressOfExpression = 101

AddressOf expression

§

TypeOfExpression = 102

TypeOf expression

§

NewExpression = 103

New expression

§

ArgumentList = 104

Argument list

§

ParameterList = 105

Parameter list

§

Parameter = 106

Parameter

§

Argument = 107

Argument

§

StatementList = 108

Block of code/statements

§

Whitespace = 1_000

Whitespace token

§

Newline = 1001

Newline token

§

EndOfLineComment = 1002

End-of-line comment token

§

RemComment = 1003

Rem comment token

§

ClassKeyword = 1004

Class keyword

§

ReDimKeyword = 1005

ReDim keyword

§

PreserveKeyword = 1006

Preserve keyword

§

DimKeyword = 1007

Dim keyword

§

DeclareKeyword = 1008

Declare keyword

§

AliasKeyword = 1009

Alias keyword

§

AttributeKeyword = 1010

Attribute keyword

§

BeginKeyword = 1011

Begin keyword

§

LibKeyword = 1012

Lib keyword

§

WithKeyword = 1013

With keyword

§

WithEventsKeyword = 1014

WithEvents keyword

§

BaseKeyword = 1015

Base keyword

§

CompareKeyword = 1016

Compare keyword

§

OptionKeyword = 1017

Option keyword

§

ExplicitKeyword = 1018

Explicit keyword

§

PrivateKeyword = 1019

Private keyword

§

PublicKeyword = 1020

Public keyword

§

ConstKeyword = 1021

Const keyword

§

AsKeyword = 1022

As keyword

§

ByValKeyword = 1023

ByVal keyword

§

ByRefKeyword = 1024

ByRef keyword

§

OptionalKeyword = 1025

Optional keyword

§

FunctionKeyword = 1026

Function keyword

§

StaticKeyword = 1027

Static keyword

§

SubKeyword = 1028

Sub keyword

§

EndKeyword = 1029

End keyword

§

TrueKeyword = 1030

True keyword

§

FalseKeyword = 1031

False keyword

§

EnumKeyword = 1032

Enum keyword

§

TypeKeyword = 1033

Type keyword

§

BooleanKeyword = 1034

Boolean keyword

§

DoubleKeyword = 1035

Double keyword

§

CurrencyKeyword = 1036

Currency keyword

§

DecimalKeyword = 1037

Decimal keyword

§

DateKeyword = 1038

Date keyword

§

ObjectKeyword = 1039

Object keyword

§

VariantKeyword = 1040

Variant keyword

§

ByteKeyword = 1041

Byte keyword

§

LongKeyword = 1042

Long keyword

§

SingleKeyword = 1043

Single keyword

§

StringKeyword = 1044

String keyword

§

IntegerKeyword = 1045

Integer keyword

§

IfKeyword = 1046

If keyword

§

ElseKeyword = 1047

Else keyword

§

ElseIfKeyword = 1048

ElseIf keyword

§

AndKeyword = 1049

And keyword

§

OrKeyword = 1050

Or keyword

§

XorKeyword = 1051

Xor keyword

§

ModKeyword = 1052

Mod keyword

§

EqvKeyword = 1053

Eqv keyword

§

AddressOfKeyword = 1054

AddressOf keyword

§

ImpKeyword = 1055

Imp keyword

§

IsKeyword = 1056

Is keyword

§

LikeKeyword = 1057

Like keyword

§

NotKeyword = 1058

Not keyword

§

ThenKeyword = 1059

Then keyword

§

GotoKeyword = 1060

Goto keyword

§

GoSubKeyword = 1061

GoSub keyword

§

ReturnKeyword = 1062

Return keyword

§

ExitKeyword = 1063

Exit keyword

§

ForKeyword = 1064

For keyword

§

EachKeyword = 1065

Each keyword

§

InKeyword = 1066

In keyword

§

ToKeyword = 1067

To keyword

§

LockKeyword = 1068

Lock keyword

§

UnlockKeyword = 1069

Unlock keyword

§

StepKeyword = 1070

Step keyword

§

StopKeyword = 1071

Stop keyword

§

WhileKeyword = 1072

While keyword

§

WendKeyword = 1073

Wend keyword

§

WidthKeyword = 1074

Width keyword

§

WriteKeyword = 1075

Write keyword

§

TimeKeyword = 1076

Time keyword

§

SetAttrKeyword = 1077

SetAttr keyword

§

SetKeyword = 1078

Set keyword

§

SendKeysKeyword = 1079

SendKeys keyword

§

SelectKeyword = 1080

Select keyword

§

CaseKeyword = 1081

Case keyword

§

SeekKeyword = 1082

Seek keyword

§

SaveSettingKeyword = 1083

SaveSetting keyword

§

SavePictureKeyword = 1084

SavePicture keyword

§

RSetKeyword = 1085

RSet keyword

§

RmDirKeyword = 1086

RmDir keyword

§

ResumeKeyword = 1087

Resume keyword

§

ResetKeyword = 1088

Reset keyword

§

RandomizeKeyword = 1089

Randomize keyword

§

RaiseEventKeyword = 1090

RaiseEvent keyword

§

PutKeyword = 1091

Put keyword

§

PropertyKeyword = 1092

Property keyword

§

PrintKeyword = 1093

Print keyword

§

OpenKeyword = 1094

Open keyword

§

OnKeyword = 1095

On keyword

§

OffKeyword = 1096

Off keyword

§

NameKeyword = 1097

Name keyword

§

MkDirKeyword = 1098

MkDir keyword

§

MidKeyword = 1099

Mid keyword

§

MidBKeyword = 1100

MidB keyword

§

LSetKeyword = 1101

LSet keyword

§

LoadKeyword = 1102

Load keyword

§

UnloadKeyword = 1103

Unload keyword

§

LineKeyword = 1104

Line keyword

§

InputKeyword = 1105

Input keyword

§

LetKeyword = 1106

Let keyword

§

KillKeyword = 1107

Kill keyword

§

ImplementsKeyword = 1108

Implies keyword

§

GetKeyword = 1109

Get keyword

§

FileCopyKeyword = 1110

FileCopy keyword

§

EventKeyword = 1111

Event keyword

§

ErrorKeyword = 1112

Error keyword

§

EraseKeyword = 1113

Erase keyword

§

DoKeyword = 1114

Do keyword

§

UntilKeyword = 1115

Until keyword

§

DeleteSettingKeyword = 1116

DeleteSetting keyword

§

DefBoolKeyword = 1117

DefBool keyword

§

DefByteKeyword = 1118

DefByte keyword

§

DefIntKeyword = 1119

DefInt keyword

§

DefLngKeyword = 1120

DefLng keyword

§

DefCurKeyword = 1121

DefCur keyword

§

DefSngKeyword = 1122

DefSng keyword

§

DefDblKeyword = 1123

DefDbl keyword

§

DefDecKeyword = 1124

DefDec keyword

§

DefDateKeyword = 1125

DefDate keyword

§

DefStrKeyword = 1126

DefStr keyword

§

DefObjKeyword = 1127

DefObj keyword

§

DefVarKeyword = 1128

DefVar keyword

§

CloseKeyword = 1129

Close keyword

§

ChDriveKeyword = 1130

ChDrive keyword

§

ChDirKeyword = 1131

ChDir keyword

§

CallKeyword = 1132

Call keyword

§

BeepKeyword = 1133

Beep keyword

§

AppActivateKeyword = 1134

AppActivate keyword

§

FriendKeyword = 1135

Friend keyword

§

BinaryKeyword = 1136

Binary keyword

§

RandomKeyword = 1137

Random keyword

§

ReadKeyword = 1138

Read keyword

§

OutputKeyword = 1139

Output keyword

§

AppendKeyword = 1140

Append keyword

§

AccessKeyword = 1141

Access keyword

§

TextKeyword = 1142

Text keyword

§

DatabaseKeyword = 1143

Database keyword

§

EmptyKeyword = 1144

Empty keyword

§

ModuleKeyword = 1145

Module keyword

§

NextKeyword = 1146

Next keyword

§

NewKeyword = 1147

New keyword

§

LenKeyword = 1148

Len keyword

§

MeKeyword = 1149

Me keyword

§

NullKeyword = 1150

Null keyword

§

ParamArrayKeyword = 1151

ParamArray keyword

§

VersionKeyword = 1152

Version keyword

§

LoopKeyword = 1153

Loop keyword

§

NothingKeyword = 1154

Nothing keyword

§

AnyKeyword = 1155

Any keyword

§

Identifier = 1156

Identifier token

§

StringLiteral = 1157

String literal token

§

IntegerLiteral = 1158

Integer literal token

§

LongLiteral = 1159

Long literal token

§

SingleLiteral = 1160

Single literal token

§

DoubleLiteral = 1161

Double literal token

§

DecimalLiteral = 1162

Decimal literal token

§

CurrencyLiteral = 1163

Currency literal token

§

DateLiteral = 1164

Date literal token

§

DollarSign = 1165

Dollar sign token

§

Underscore = 1166

Underscore token

§

Ampersand = 1167

Ampersand token

§

Percent = 1168

Percent token

§

Octothorpe = 1169

Octothorpe ‘#’ token

§

LeftParenthesis = 1170

Left parenthesis ‘(’ token

§

RightParenthesis = 1171

Right parenthesis ‘)’ token

§

LeftCurlyBrace = 1172

Left curly brace ‘{’ token

§

RightCurlyBrace = 1173

Right curly brace ‘}’ token

§

LeftSquareBracket = 1174

Left square bracket ‘[’ token

§

RightSquareBracket = 1175

Right square bracket ‘]’ token

§

Comma = 1176

Comma ‘,’ token

§

Semicolon = 1177

Semicolon ‘;’ token

§

AtSign = 1178

At sign ‘@’ token

§

ExclamationMark = 1179

Exclamation mark ‘!’ token

§

EqualityOperator = 1180

Equality operator ‘=’ token

§

InequalityOperator = 1181

Inequality operator ‘<>’ token

§

LessThanOrEqualOperator = 1182

Less than or equal operator ‘<=’ token

§

GreaterThanOrEqualOperator = 1183

Greater than or equal operator ‘>=’ token

§

LessThanOperator = 1184

Less than operator ‘<’ token

§

GreaterThanOperator = 1185

Greater than operator ‘>’ token

§

MultiplicationOperator = 1186

Multiplication operator ‘*’ token

§

SubtractionOperator = 1187

Subtraction operator ‘-’ token

§

AdditionOperator = 1188

Addition operator ‘+’ token

§

DivisionOperator = 1189

Division operator ‘/’ token

§

BackwardSlashOperator = 1190

Backward slash operator ’' token

§

PeriodOperator = 1191

Period operator ‘.’ token

§

ColonOperator = 1192

Colon operator ‘:’ token

§

ExponentiationOperator = 1193

Exponentiation operator ‘^’ token

§

Error = 1194

Error node for error recovery

§

Unknown = 1195

Unknown syntax kind

Trait Implementations§

Source§

impl Clone for SyntaxKind

Source§

fn clone(&self) -> SyntaxKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SyntaxKind

Source§

impl Debug for SyntaxKind

Source§

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

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

impl Display for SyntaxKind

Source§

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

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

impl Eq for SyntaxKind

Source§

impl From<Token> for SyntaxKind

Source§

fn from(token: Token) -> Self

Converts to this type from the input type.
Source§

impl Hash for SyntaxKind

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 Ord for SyntaxKind

Source§

fn cmp(&self, other: &SyntaxKind) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for SyntaxKind

Source§

fn eq(&self, other: &SyntaxKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 PartialOrd for SyntaxKind

Source§

fn partial_cmp(&self, other: &SyntaxKind) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for SyntaxKind

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 StructuralPartialEq for SyntaxKind

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> Fmt for T
where T: Display,

Source§

fn fg<C>(self, color: C) -> Foreground<Self>
where C: Into<Option<Color>>, Self: Display,

Give this value the specified foreground colour.
Source§

fn bg<C>(self, color: C) -> Background<Self>
where C: Into<Option<Color>>, Self: Display,

Give this value the specified background colour.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Paint for T
where T: ?Sized,

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1:

renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.