|
|
|
@ -77,180 +77,184 @@ namespace ICSharpCode.NRefactory.Parser.VB
@@ -77,180 +77,184 @@ namespace ICSharpCode.NRefactory.Parser.VB
|
|
|
|
|
public const int As = 63; |
|
|
|
|
public const int Ascending = 64; |
|
|
|
|
public const int Assembly = 65; |
|
|
|
|
public const int Auto = 66; |
|
|
|
|
public const int Binary = 67; |
|
|
|
|
public const int Boolean = 68; |
|
|
|
|
public const int ByRef = 69; |
|
|
|
|
public const int By = 70; |
|
|
|
|
public const int Byte = 71; |
|
|
|
|
public const int ByVal = 72; |
|
|
|
|
public const int Call = 73; |
|
|
|
|
public const int Case = 74; |
|
|
|
|
public const int Catch = 75; |
|
|
|
|
public const int CBool = 76; |
|
|
|
|
public const int CByte = 77; |
|
|
|
|
public const int CChar = 78; |
|
|
|
|
public const int CDate = 79; |
|
|
|
|
public const int CDbl = 80; |
|
|
|
|
public const int CDec = 81; |
|
|
|
|
public const int Char = 82; |
|
|
|
|
public const int CInt = 83; |
|
|
|
|
public const int Class = 84; |
|
|
|
|
public const int CLng = 85; |
|
|
|
|
public const int CObj = 86; |
|
|
|
|
public const int Compare = 87; |
|
|
|
|
public const int Const = 88; |
|
|
|
|
public const int Continue = 89; |
|
|
|
|
public const int CSByte = 90; |
|
|
|
|
public const int CShort = 91; |
|
|
|
|
public const int CSng = 92; |
|
|
|
|
public const int CStr = 93; |
|
|
|
|
public const int CType = 94; |
|
|
|
|
public const int CUInt = 95; |
|
|
|
|
public const int CULng = 96; |
|
|
|
|
public const int CUShort = 97; |
|
|
|
|
public const int Custom = 98; |
|
|
|
|
public const int Date = 99; |
|
|
|
|
public const int Decimal = 100; |
|
|
|
|
public const int Declare = 101; |
|
|
|
|
public const int Default = 102; |
|
|
|
|
public const int Delegate = 103; |
|
|
|
|
public const int Descending = 104; |
|
|
|
|
public const int Dim = 105; |
|
|
|
|
public const int DirectCast = 106; |
|
|
|
|
public const int Distinct = 107; |
|
|
|
|
public const int Do = 108; |
|
|
|
|
public const int Double = 109; |
|
|
|
|
public const int Each = 110; |
|
|
|
|
public const int Else = 111; |
|
|
|
|
public const int ElseIf = 112; |
|
|
|
|
public const int End = 113; |
|
|
|
|
public const int EndIf = 114; |
|
|
|
|
public const int Enum = 115; |
|
|
|
|
new public const int Equals = 116; |
|
|
|
|
public const int Erase = 117; |
|
|
|
|
public const int Error = 118; |
|
|
|
|
public const int Event = 119; |
|
|
|
|
public const int Exit = 120; |
|
|
|
|
public const int Explicit = 121; |
|
|
|
|
public const int False = 122; |
|
|
|
|
public const int Finally = 123; |
|
|
|
|
public const int For = 124; |
|
|
|
|
public const int Friend = 125; |
|
|
|
|
public const int From = 126; |
|
|
|
|
public const int Function = 127; |
|
|
|
|
public const int Get = 128; |
|
|
|
|
new public const int GetType = 129; |
|
|
|
|
public const int Global = 130; |
|
|
|
|
public const int GoSub = 131; |
|
|
|
|
public const int GoTo = 132; |
|
|
|
|
public const int Group = 133; |
|
|
|
|
public const int Handles = 134; |
|
|
|
|
public const int If = 135; |
|
|
|
|
public const int Implements = 136; |
|
|
|
|
public const int Imports = 137; |
|
|
|
|
public const int In = 138; |
|
|
|
|
public const int Infer = 139; |
|
|
|
|
public const int Inherits = 140; |
|
|
|
|
public const int Integer = 141; |
|
|
|
|
public const int Interface = 142; |
|
|
|
|
public const int Into = 143; |
|
|
|
|
public const int Is = 144; |
|
|
|
|
public const int IsNot = 145; |
|
|
|
|
public const int Join = 146; |
|
|
|
|
public const int Key = 147; |
|
|
|
|
public const int Let = 148; |
|
|
|
|
public const int Lib = 149; |
|
|
|
|
public const int Like = 150; |
|
|
|
|
public const int Long = 151; |
|
|
|
|
public const int Loop = 152; |
|
|
|
|
public const int Me = 153; |
|
|
|
|
public const int Mod = 154; |
|
|
|
|
public const int Module = 155; |
|
|
|
|
public const int MustInherit = 156; |
|
|
|
|
public const int MustOverride = 157; |
|
|
|
|
public const int MyBase = 158; |
|
|
|
|
public const int MyClass = 159; |
|
|
|
|
public const int Namespace = 160; |
|
|
|
|
public const int Narrowing = 161; |
|
|
|
|
public const int New = 162; |
|
|
|
|
public const int Next = 163; |
|
|
|
|
public const int Not = 164; |
|
|
|
|
public const int Nothing = 165; |
|
|
|
|
public const int NotInheritable = 166; |
|
|
|
|
public const int NotOverridable = 167; |
|
|
|
|
public const int Object = 168; |
|
|
|
|
public const int Of = 169; |
|
|
|
|
public const int Off = 170; |
|
|
|
|
public const int On = 171; |
|
|
|
|
public const int Operator = 172; |
|
|
|
|
public const int Option = 173; |
|
|
|
|
public const int Optional = 174; |
|
|
|
|
public const int Or = 175; |
|
|
|
|
public const int Order = 176; |
|
|
|
|
public const int OrElse = 177; |
|
|
|
|
public const int Out = 178; |
|
|
|
|
public const int Overloads = 179; |
|
|
|
|
public const int Overridable = 180; |
|
|
|
|
public const int Overrides = 181; |
|
|
|
|
public const int ParamArray = 182; |
|
|
|
|
public const int Partial = 183; |
|
|
|
|
public const int Preserve = 184; |
|
|
|
|
public const int Private = 185; |
|
|
|
|
public const int Property = 186; |
|
|
|
|
public const int Protected = 187; |
|
|
|
|
public const int Public = 188; |
|
|
|
|
public const int RaiseEvent = 189; |
|
|
|
|
public const int ReadOnly = 190; |
|
|
|
|
public const int ReDim = 191; |
|
|
|
|
public const int Rem = 192; |
|
|
|
|
public const int RemoveHandler = 193; |
|
|
|
|
public const int Resume = 194; |
|
|
|
|
public const int Return = 195; |
|
|
|
|
public const int SByte = 196; |
|
|
|
|
public const int Select = 197; |
|
|
|
|
public const int Set = 198; |
|
|
|
|
public const int Shadows = 199; |
|
|
|
|
public const int Shared = 200; |
|
|
|
|
public const int Short = 201; |
|
|
|
|
public const int Single = 202; |
|
|
|
|
public const int Skip = 203; |
|
|
|
|
public const int Static = 204; |
|
|
|
|
public const int Step = 205; |
|
|
|
|
public const int Stop = 206; |
|
|
|
|
public const int Strict = 207; |
|
|
|
|
public const int String = 208; |
|
|
|
|
public const int Structure = 209; |
|
|
|
|
public const int Sub = 210; |
|
|
|
|
public const int SyncLock = 211; |
|
|
|
|
public const int Take = 212; |
|
|
|
|
public const int Text = 213; |
|
|
|
|
public const int Then = 214; |
|
|
|
|
public const int Throw = 215; |
|
|
|
|
public const int To = 216; |
|
|
|
|
public const int True = 217; |
|
|
|
|
public const int Try = 218; |
|
|
|
|
public const int TryCast = 219; |
|
|
|
|
public const int TypeOf = 220; |
|
|
|
|
public const int UInteger = 221; |
|
|
|
|
public const int ULong = 222; |
|
|
|
|
public const int Unicode = 223; |
|
|
|
|
public const int Until = 224; |
|
|
|
|
public const int UShort = 225; |
|
|
|
|
public const int Using = 226; |
|
|
|
|
public const int Variant = 227; |
|
|
|
|
public const int Wend = 228; |
|
|
|
|
public const int When = 229; |
|
|
|
|
public const int Where = 230; |
|
|
|
|
public const int While = 231; |
|
|
|
|
public const int Widening = 232; |
|
|
|
|
public const int With = 233; |
|
|
|
|
public const int WithEvents = 234; |
|
|
|
|
public const int WriteOnly = 235; |
|
|
|
|
public const int Xor = 236; |
|
|
|
|
public const int GetXmlNamespace = 237; |
|
|
|
|
public const int Async = 66; |
|
|
|
|
public const int Auto = 67; |
|
|
|
|
public const int Await = 68; |
|
|
|
|
public const int Binary = 69; |
|
|
|
|
public const int Boolean = 70; |
|
|
|
|
public const int ByRef = 71; |
|
|
|
|
public const int By = 72; |
|
|
|
|
public const int Byte = 73; |
|
|
|
|
public const int ByVal = 74; |
|
|
|
|
public const int Call = 75; |
|
|
|
|
public const int Case = 76; |
|
|
|
|
public const int Catch = 77; |
|
|
|
|
public const int CBool = 78; |
|
|
|
|
public const int CByte = 79; |
|
|
|
|
public const int CChar = 80; |
|
|
|
|
public const int CDate = 81; |
|
|
|
|
public const int CDbl = 82; |
|
|
|
|
public const int CDec = 83; |
|
|
|
|
public const int Char = 84; |
|
|
|
|
public const int CInt = 85; |
|
|
|
|
public const int Class = 86; |
|
|
|
|
public const int CLng = 87; |
|
|
|
|
public const int CObj = 88; |
|
|
|
|
public const int Compare = 89; |
|
|
|
|
public const int Const = 90; |
|
|
|
|
public const int Continue = 91; |
|
|
|
|
public const int CSByte = 92; |
|
|
|
|
public const int CShort = 93; |
|
|
|
|
public const int CSng = 94; |
|
|
|
|
public const int CStr = 95; |
|
|
|
|
public const int CType = 96; |
|
|
|
|
public const int CUInt = 97; |
|
|
|
|
public const int CULng = 98; |
|
|
|
|
public const int CUShort = 99; |
|
|
|
|
public const int Custom = 100; |
|
|
|
|
public const int Date = 101; |
|
|
|
|
public const int Decimal = 102; |
|
|
|
|
public const int Declare = 103; |
|
|
|
|
public const int Default = 104; |
|
|
|
|
public const int Delegate = 105; |
|
|
|
|
public const int Descending = 106; |
|
|
|
|
public const int Dim = 107; |
|
|
|
|
public const int DirectCast = 108; |
|
|
|
|
public const int Distinct = 109; |
|
|
|
|
public const int Do = 110; |
|
|
|
|
public const int Double = 111; |
|
|
|
|
public const int Each = 112; |
|
|
|
|
public const int Else = 113; |
|
|
|
|
public const int ElseIf = 114; |
|
|
|
|
public const int End = 115; |
|
|
|
|
public const int EndIf = 116; |
|
|
|
|
public const int Enum = 117; |
|
|
|
|
new public const int Equals = 118; |
|
|
|
|
public const int Erase = 119; |
|
|
|
|
public const int Error = 120; |
|
|
|
|
public const int Event = 121; |
|
|
|
|
public const int Exit = 122; |
|
|
|
|
public const int Explicit = 123; |
|
|
|
|
public const int False = 124; |
|
|
|
|
public const int Finally = 125; |
|
|
|
|
public const int For = 126; |
|
|
|
|
public const int Friend = 127; |
|
|
|
|
public const int From = 128; |
|
|
|
|
public const int Function = 129; |
|
|
|
|
public const int Get = 130; |
|
|
|
|
new public const int GetType = 131; |
|
|
|
|
public const int Global = 132; |
|
|
|
|
public const int GoSub = 133; |
|
|
|
|
public const int GoTo = 134; |
|
|
|
|
public const int Group = 135; |
|
|
|
|
public const int Handles = 136; |
|
|
|
|
public const int If = 137; |
|
|
|
|
public const int Implements = 138; |
|
|
|
|
public const int Imports = 139; |
|
|
|
|
public const int In = 140; |
|
|
|
|
public const int Infer = 141; |
|
|
|
|
public const int Inherits = 142; |
|
|
|
|
public const int Integer = 143; |
|
|
|
|
public const int Interface = 144; |
|
|
|
|
public const int Into = 145; |
|
|
|
|
public const int Is = 146; |
|
|
|
|
public const int IsNot = 147; |
|
|
|
|
public const int Iterator = 148; |
|
|
|
|
public const int Join = 149; |
|
|
|
|
public const int Key = 150; |
|
|
|
|
public const int Let = 151; |
|
|
|
|
public const int Lib = 152; |
|
|
|
|
public const int Like = 153; |
|
|
|
|
public const int Long = 154; |
|
|
|
|
public const int Loop = 155; |
|
|
|
|
public const int Me = 156; |
|
|
|
|
public const int Mod = 157; |
|
|
|
|
public const int Module = 158; |
|
|
|
|
public const int MustInherit = 159; |
|
|
|
|
public const int MustOverride = 160; |
|
|
|
|
public const int MyBase = 161; |
|
|
|
|
public const int MyClass = 162; |
|
|
|
|
public const int Namespace = 163; |
|
|
|
|
public const int Narrowing = 164; |
|
|
|
|
public const int New = 165; |
|
|
|
|
public const int Next = 166; |
|
|
|
|
public const int Not = 167; |
|
|
|
|
public const int Nothing = 168; |
|
|
|
|
public const int NotInheritable = 169; |
|
|
|
|
public const int NotOverridable = 170; |
|
|
|
|
public const int Object = 171; |
|
|
|
|
public const int Of = 172; |
|
|
|
|
public const int Off = 173; |
|
|
|
|
public const int On = 174; |
|
|
|
|
public const int Operator = 175; |
|
|
|
|
public const int Option = 176; |
|
|
|
|
public const int Optional = 177; |
|
|
|
|
public const int Or = 178; |
|
|
|
|
public const int Order = 179; |
|
|
|
|
public const int OrElse = 180; |
|
|
|
|
public const int Out = 181; |
|
|
|
|
public const int Overloads = 182; |
|
|
|
|
public const int Overridable = 183; |
|
|
|
|
public const int Overrides = 184; |
|
|
|
|
public const int ParamArray = 185; |
|
|
|
|
public const int Partial = 186; |
|
|
|
|
public const int Preserve = 187; |
|
|
|
|
public const int Private = 188; |
|
|
|
|
public const int Property = 189; |
|
|
|
|
public const int Protected = 190; |
|
|
|
|
public const int Public = 191; |
|
|
|
|
public const int RaiseEvent = 192; |
|
|
|
|
public const int ReadOnly = 193; |
|
|
|
|
public const int ReDim = 194; |
|
|
|
|
public const int Rem = 195; |
|
|
|
|
public const int RemoveHandler = 196; |
|
|
|
|
public const int Resume = 197; |
|
|
|
|
public const int Return = 198; |
|
|
|
|
public const int SByte = 199; |
|
|
|
|
public const int Select = 200; |
|
|
|
|
public const int Set = 201; |
|
|
|
|
public const int Shadows = 202; |
|
|
|
|
public const int Shared = 203; |
|
|
|
|
public const int Short = 204; |
|
|
|
|
public const int Single = 205; |
|
|
|
|
public const int Skip = 206; |
|
|
|
|
public const int Static = 207; |
|
|
|
|
public const int Step = 208; |
|
|
|
|
public const int Stop = 209; |
|
|
|
|
public const int Strict = 210; |
|
|
|
|
public const int String = 211; |
|
|
|
|
public const int Structure = 212; |
|
|
|
|
public const int Sub = 213; |
|
|
|
|
public const int SyncLock = 214; |
|
|
|
|
public const int Take = 215; |
|
|
|
|
public const int Text = 216; |
|
|
|
|
public const int Then = 217; |
|
|
|
|
public const int Throw = 218; |
|
|
|
|
public const int To = 219; |
|
|
|
|
public const int True = 220; |
|
|
|
|
public const int Try = 221; |
|
|
|
|
public const int TryCast = 222; |
|
|
|
|
public const int TypeOf = 223; |
|
|
|
|
public const int UInteger = 224; |
|
|
|
|
public const int ULong = 225; |
|
|
|
|
public const int Unicode = 226; |
|
|
|
|
public const int Until = 227; |
|
|
|
|
public const int UShort = 228; |
|
|
|
|
public const int Using = 229; |
|
|
|
|
public const int Variant = 230; |
|
|
|
|
public const int Wend = 231; |
|
|
|
|
public const int When = 232; |
|
|
|
|
public const int Where = 233; |
|
|
|
|
public const int While = 234; |
|
|
|
|
public const int Widening = 235; |
|
|
|
|
public const int With = 236; |
|
|
|
|
public const int WithEvents = 237; |
|
|
|
|
public const int WriteOnly = 238; |
|
|
|
|
public const int Xor = 239; |
|
|
|
|
public const int Yield = 240; |
|
|
|
|
public const int GetXmlNamespace = 241; |
|
|
|
|
|
|
|
|
|
public const int MaxToken = 238; |
|
|
|
|
public const int MaxToken = 242; |
|
|
|
|
static BitArray NewSet(params int[] values) |
|
|
|
|
{ |
|
|
|
|
BitArray bitArray = new BitArray(MaxToken); |
|
|
|
@ -263,10 +267,10 @@ namespace ICSharpCode.NRefactory.Parser.VB
@@ -263,10 +267,10 @@ namespace ICSharpCode.NRefactory.Parser.VB
|
|
|
|
|
public static BitArray BlockSucc = NewSet(Case, Catch, Else, ElseIf, End, Finally, Loop, Next); |
|
|
|
|
public static BitArray GlobalLevel = NewSet(Namespace, Module, Class, Structure, Imports, Option); |
|
|
|
|
public static BitArray TypeLevel = NewSet(Sub, Function, Property); |
|
|
|
|
public static BitArray IdentifierTokens = NewSet(Text, Binary, Compare, Assembly, Ansi, Auto, Preserve, Unicode, Until, Off, Out, Key, Explicit, Infer, From, Join, Equals, Distinct, Where, Take, Skip, Order, By, Ascending, Descending, Group, Into, Aggregate); |
|
|
|
|
public static BitArray IdentifierTokens = NewSet(Text, Binary, Compare, Assembly, Ansi, Auto, Preserve, Unicode, Until, Off, Out, Key, Explicit, Infer, From, Join, Equals, Distinct, Where, Take, Skip, Order, By, Ascending, Descending, Group, Into, Aggregate, Async, Await, Iterator, Yield); |
|
|
|
|
public static BitArray ExpressionStart = NewSet(Me, MyBase, MyClass, True, False, Not, From, Aggregate, New, Nothing, AddressOf, GetType, TypeOf, GetXmlNamespace, Global, Boolean, Date, Char, String, Decimal, Byte, Short, Integer, Long, Single, Double, UInteger, ULong, UShort, SByte, Sub, Function, DirectCast, TryCast, CType, CBool, CByte, CChar, CDate, CDec, CDbl, CInt, CLng, CObj, CSByte, CShort, CSng, CStr, CUInt, CULng, CUShort); |
|
|
|
|
public static BitArray StatementStart = NewSet(Nothing, Me, MyBase, MyClass, True, False, Not, From, Aggregate, New, Nothing, AddressOf, GetType, TypeOf, GetXmlNamespace, Global, Boolean, Date, Char, String, Decimal, Byte, Short, Integer, Long, Single, Double, UInteger, ULong, UShort, SByte, Sub, Function, DirectCast, TryCast, CType, CBool, CByte, CChar, CDate, CDec, CDbl, CInt, CLng, CObj, CSByte, CShort, CSng, CStr, CUInt, CULng, CUShort, Dim, Const, Static, For, While, Do, Select); |
|
|
|
|
public static BitArray SimpleTypeName = NewSet(Boolean, Date, Char, String, Decimal, Byte, Short, Integer, Long, Single, Double, UInteger, ULong, UShort, SByte, Text, Binary, Compare, Assembly, Ansi, Auto, Preserve, Unicode, Until, Off, Out, Key, Explicit, Infer, From, Join, Equals, Distinct, Where, Take, Skip, Order, By, Ascending, Descending, Group, Into, Aggregate); |
|
|
|
|
public static BitArray SimpleTypeName = NewSet(Boolean, Date, Char, String, Decimal, Byte, Short, Integer, Long, Single, Double, UInteger, ULong, UShort, SByte, Text, Binary, Compare, Assembly, Ansi, Auto, Preserve, Unicode, Until, Off, Out, Key, Explicit, Infer, From, Join, Equals, Distinct, Where, Take, Skip, Order, By, Ascending, Descending, Group, Into, Aggregate, Async, Await, Iterator, Yield); |
|
|
|
|
public static BitArray CastExpressions = NewSet(DirectCast, TryCast, CType, CBool, CByte, CChar, CDate, CDec, CDbl, CInt, CLng, CObj, CSByte, CShort, CSng, CStr, CUInt, CULng, CUShort); |
|
|
|
|
public static BitArray BooleanExpressions = NewSet(True, False); |
|
|
|
|
public static BitArray LambdaStart = NewSet(Sub, Function); |
|
|
|
@ -343,7 +347,9 @@ namespace ICSharpCode.NRefactory.Parser.VB
@@ -343,7 +347,9 @@ namespace ICSharpCode.NRefactory.Parser.VB
|
|
|
|
|
"As", |
|
|
|
|
"Ascending", |
|
|
|
|
"Assembly", |
|
|
|
|
"Async", |
|
|
|
|
"Auto", |
|
|
|
|
"Await", |
|
|
|
|
"Binary", |
|
|
|
|
"Boolean", |
|
|
|
|
"ByRef", |
|
|
|
@ -423,6 +429,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
@@ -423,6 +429,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
|
|
|
|
|
"Into", |
|
|
|
|
"Is", |
|
|
|
|
"IsNot", |
|
|
|
|
"Iterator", |
|
|
|
|
"Join", |
|
|
|
|
"Key", |
|
|
|
|
"Let", |
|
|
|
@ -514,6 +521,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
@@ -514,6 +521,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
|
|
|
|
|
"WithEvents", |
|
|
|
|
"WriteOnly", |
|
|
|
|
"Xor", |
|
|
|
|
"Yield", |
|
|
|
|
"GetXmlNamespace", |
|
|
|
|
}; |
|
|
|
|
public static string GetTokenString(int token) |
|
|
|
|