Types in CilBrowser.Core.SyntaxModel.JavaScript namespace: JsRegexLiteralToken JsSyntaxProvider JsTokenFactory |
.class public auto ansi sealed beforefieldinit CilBrowser.Core.SyntaxModel.JavaScript.JsTokenFactory
extends [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxFactory
{
.field private static initonly class [netstandard]System.Collections.Generic.HashSet`1<string> keywords
.field public static initonly class CilBrowser.Core.SyntaxModel.JavaScript.JsTokenFactory Value
.method private hidebysig specialname rtspecialname instance void .ctor() cil managed
{
.maxstack 8
ldarg.0
call instance void [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxFactory::.ctor()
nop
nop
ret
}
.method private hidebysig specialname rtspecialname static void .cctor() cil managed
{
.maxstack 4
ldc.i4.s 35
newarr [netstandard]System.String
dup
ldc.i4.0
ldstr "break"
stelem.ref
dup
ldc.i4.1
ldstr "case"
stelem.ref
dup
ldc.i4.2
ldstr "catch"
stelem.ref
dup
ldc.i4.3
ldstr "class"
stelem.ref
dup
ldc.i4.4
ldstr "const"
stelem.ref
dup
ldc.i4.5
ldstr "continue"
stelem.ref
dup
ldc.i4.6
ldstr "debugger"
stelem.ref
dup
ldc.i4.7
ldstr "default"
stelem.ref
dup
ldc.i4.8
ldstr "delete"
stelem.ref
dup
ldc.i4.s 9
ldstr "do"
stelem.ref
dup
ldc.i4.s 10
ldstr "else"
stelem.ref
dup
ldc.i4.s 11
ldstr "export"
stelem.ref
dup
ldc.i4.s 12
ldstr "extends"
stelem.ref
dup
ldc.i4.s 13
ldstr "false"
stelem.ref
dup
ldc.i4.s 14
ldstr "finally"
stelem.ref
dup
ldc.i4.s 15
ldstr "for"
stelem.ref
dup
ldc.i4.s 16
ldstr "function"
stelem.ref
dup
ldc.i4.s 17
ldstr "if"
stelem.ref
dup
ldc.i4.s 18
ldstr "import"
stelem.ref
dup
ldc.i4.s 19
ldstr "in"
stelem.ref
dup
ldc.i4.s 20
ldstr "instanceof"
stelem.ref
dup
ldc.i4.s 21
ldstr "new"
stelem.ref
dup
ldc.i4.s 22
ldstr "null"
stelem.ref
dup
ldc.i4.s 23
ldstr "return"
stelem.ref
dup
ldc.i4.s 24
ldstr "super"
stelem.ref
dup
ldc.i4.s 25
ldstr "switch"
stelem.ref
dup
ldc.i4.s 26
ldstr "this"
stelem.ref
dup
ldc.i4.s 27
ldstr "throw"
stelem.ref
dup
ldc.i4.s 28
ldstr "true"
stelem.ref
dup
ldc.i4.s 29
ldstr "try"
stelem.ref
dup
ldc.i4.s 30
ldstr "typeof"
stelem.ref
dup
ldc.i4.s 31
ldstr "var"
stelem.ref
dup
ldc.i4.s 32
ldstr "void"
stelem.ref
dup
ldc.i4.s 33
ldstr "while"
stelem.ref
dup
ldc.i4.s 34
ldstr "with"
stelem.ref
newobj instance void class [netstandard]System.Collections.Generic.HashSet`1<string>::.ctor(class [netstandard]System.Collections.Generic.IEnumerable`1<!0>)
stsfld class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.SyntaxModel.JavaScript.JsTokenFactory::keywords
newobj instance void CilBrowser.Core.SyntaxModel.JavaScript.JsTokenFactory::.ctor()
stsfld class CilBrowser.Core.SyntaxModel.JavaScript.JsTokenFactory CilBrowser.Core.SyntaxModel.JavaScript.JsTokenFactory::Value
ret
}
.method private hidebysig static valuetype [CilTools.SourceCode]CilTools.SourceCode.Common.TokenKind GetKind(
string token
) cil managed
{
.maxstack 2
.locals init (bool V_0,
valuetype [CilTools.SourceCode]CilTools.SourceCode.Common.TokenKind V_1,
bool V_2,
bool V_3)
nop
ldarg.0
callvirt instance int32 [netstandard]System.String::get_Length()
ldc.i4.0
ceq
stloc.0
ldloc.0
brfalse.s IL_0001
ldc.i4.0
stloc.1
br.s IL_0006
IL_0001: ldarg.0
ldc.i4.0
callvirt instance char [netstandard]System.String::get_Chars(int32)
call bool [netstandard]System.Char::IsLetter(char)
brtrue.s IL_0002
ldarg.0
ldc.i4.0
callvirt instance char [netstandard]System.String::get_Chars(int32)
ldc.i4.s 95
ceq
br.s IL_0003
IL_0002: ldc.i4.1
IL_0003: stloc.2
ldloc.2
brfalse.s IL_0005
nop
ldsfld class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.SyntaxModel.JavaScript.JsTokenFactory::keywords
ldarg.0
callvirt instance bool class [netstandard]System.Collections.Generic.HashSet`1<string>::Contains(!0)
stloc.3
ldloc.3
brfalse.s IL_0004
ldc.i4.4
stloc.1
br.s IL_0006
IL_0004: ldc.i4.1
stloc.1
br.s IL_0006
IL_0005: nop
ldarg.0
call valuetype [CilTools.SourceCode]CilTools.SourceCode.Common.TokenKind CilBrowser.Core.SyntaxModel.SourceParser::GetKindCommon(string)
stloc.1
br.s IL_0006
IL_0006: ldloc.1
ret
}
.method public hidebysig virtual instance class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxNode CreateNode(
string content,
string leadingWhitespace,
string trailingWhitespace
) cil managed
{
.maxstack 4
.locals init (valuetype [CilTools.SourceCode]CilTools.SourceCode.Common.TokenKind V_0,
class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxNode V_1)
nop
ldarg.1
call valuetype [CilTools.SourceCode]CilTools.SourceCode.Common.TokenKind CilBrowser.Core.SyntaxModel.JavaScript.JsTokenFactory::GetKind(string)
stloc.0
ldarg.1
ldloc.0
ldarg.2
ldarg.3
newobj instance void [CilTools.SourceCode]CilTools.SourceCode.Common.SourceToken::.ctor(string, valuetype [CilTools.SourceCode]CilTools.SourceCode.Common.TokenKind, string, string)
stloc.1
br.s IL_0001
IL_0001: ldloc.1
ret
}
}
|