Types in CilBrowser.Core.SyntaxModel namespace: SourceParser SyntaxElement <EnumerateChildNodes>d__6 SyntaxElementDefinition <get_End>d__7 <get_Start>d__5 SyntaxElementReader <ReadAll>d__6 SyntaxFilter SyntaxKind SyntaxProvider |
.class public abstract auto ansi sealed CilBrowser.Core.SyntaxModel.SourceParser
extends [netstandard]System.Object
{
.field private static class [netstandard]System.Collections.Generic.Dictionary`2<string, class CilBrowser.Core.SyntaxModel.SyntaxProvider> s_map
.field private static initonly class [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxTokenDefinition[] s_markupDefinitions
.field private static initonly class [netstandard]System.Collections.Generic.HashSet`1<string> s_markupExts
.method private hidebysig specialname rtspecialname static void .cctor() cil managed
{
.maxstack 4
newobj instance void class [netstandard]System.Collections.Generic.Dictionary`2<string, class CilBrowser.Core.SyntaxModel.SyntaxProvider>::.ctor()
stsfld class [netstandard]System.Collections.Generic.Dictionary`2<string, class CilBrowser.Core.SyntaxModel.SyntaxProvider> CilBrowser.Core.SyntaxModel.SourceParser::s_map
ldc.i4.6
newarr [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxTokenDefinition
dup
ldc.i4.0
newobj instance void CilTools.SourceCode.Common.CommonNameToken::.ctor()
stelem.ref
dup
ldc.i4.1
newobj instance void CilBrowser.Core.SyntaxModel.Markup.XmlCommentToken::.ctor()
stelem.ref
dup
ldc.i4.2
newobj instance void [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.PunctuationToken::.ctor()
stelem.ref
dup
ldc.i4.3
newobj instance void [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.WhitespaceToken::.ctor()
stelem.ref
dup
ldc.i4.4
newobj instance void [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.NumericLiteralToken::.ctor()
stelem.ref
dup
ldc.i4.5
newobj instance void CilBrowser.Core.SyntaxModel.Markup.XmlTextLiteralToken::.ctor()
stelem.ref
stsfld class [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxTokenDefinition[] CilBrowser.Core.SyntaxModel.SourceParser::s_markupDefinitions
ldc.i4.s 10
newarr [netstandard]System.String
dup
ldc.i4.0
ldstr ".xml"
stelem.ref
dup
ldc.i4.1
ldstr ".csproj"
stelem.ref
dup
ldc.i4.2
ldstr ".vbproj"
stelem.ref
dup
ldc.i4.3
ldstr ".vcxproj"
stelem.ref
dup
ldc.i4.4
ldstr ".proj"
stelem.ref
dup
ldc.i4.5
ldstr ".ilproj"
stelem.ref
dup
ldc.i4.6
ldstr ".htm"
stelem.ref
dup
ldc.i4.7
ldstr ".html"
stelem.ref
dup
ldc.i4.8
ldstr ".config"
stelem.ref
dup
ldc.i4.s 9
ldstr ".xaml"
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.SourceParser::s_markupExts
nop
ldstr ".js"
newobj instance void CilBrowser.Core.SyntaxModel.JavaScript.JsSyntaxProvider::.ctor()
call void CilBrowser.Core.SyntaxModel.SourceParser::RegisterProvider(string, class CilBrowser.Core.SyntaxModel.SyntaxProvider)
nop
ldstr ".ps1"
newobj instance void CilBrowser.Core.SyntaxModel.PowerShell.PsSyntaxProvider::.ctor()
call void CilBrowser.Core.SyntaxModel.SourceParser::RegisterProvider(string, class CilBrowser.Core.SyntaxModel.SyntaxProvider)
nop
ldstr ".java"
newobj instance void CilBrowser.Core.SyntaxModel.Java.JavaSyntaxProvider::.ctor()
call void CilBrowser.Core.SyntaxModel.SourceParser::RegisterProvider(string, class CilBrowser.Core.SyntaxModel.SyntaxProvider)
nop
ldstr ".prg"
newobj instance void CilBrowser.Core.SyntaxModel.FoxPro.FoxSyntaxProvider::.ctor()
call void CilBrowser.Core.SyntaxModel.SourceParser::RegisterProvider(string, class CilBrowser.Core.SyntaxModel.SyntaxProvider)
nop
ret
}
.method private hidebysig static void RegisterProvider(
string ext,
class CilBrowser.Core.SyntaxModel.SyntaxProvider provider
) cil managed
{
.maxstack 8
nop
ldsfld class [netstandard]System.Collections.Generic.Dictionary`2<string, class CilBrowser.Core.SyntaxModel.SyntaxProvider> CilBrowser.Core.SyntaxModel.SourceParser::s_map
ldarg.0
ldarg.1
callvirt instance void class [netstandard]System.Collections.Generic.Dictionary`2<string, class CilBrowser.Core.SyntaxModel.SyntaxProvider>::set_Item(!0, !1)
nop
ret
}
.method public hidebysig static class [CilTools.SourceCode]CilTools.SourceCode.Common.SourceToken[] ParseXmlTokens(
string content
) cil managed
{
.maxstack 3
.locals init (class [CilTools.SourceCode]CilTools.SourceCode.Common.SourceToken[] V_0)
nop
ldarg.0
ldsfld class [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxTokenDefinition[] CilBrowser.Core.SyntaxModel.SourceParser::s_markupDefinitions
ldsfld class CilBrowser.Core.SyntaxModel.Markup.MarkupTokenFactory CilBrowser.Core.SyntaxModel.Markup.MarkupTokenFactory::Value
call class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxNode[] [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxReader::ReadAllNodes(string, class [netstandard]System.Collections.Generic.IEnumerable`1<class [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxTokenDefinition>, class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxFactory)
call class [netstandard]System.Collections.Generic.IEnumerable`1<!!0> [netstandard]System.Linq.Enumerable::Cast<class [CilTools.SourceCode]CilTools.SourceCode.Common.SourceToken>(class [netstandard]System.Collections.IEnumerable)
call !!0[] [netstandard]System.Linq.Enumerable::ToArray<class [CilTools.SourceCode]CilTools.SourceCode.Common.SourceToken>(class [netstandard]System.Collections.Generic.IEnumerable`1<!!0>)
stloc.0
br.s IL_0001
IL_0001: ldloc.0
ret
}
.method public hidebysig static class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxNode[] Parse(
string content,
string ext
) cil managed
{
.maxstack 3
.locals init (bool V_0,
class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxNode[] V_1,
bool V_2,
bool V_3,
class [CilTools.SourceCode]CilTools.SourceCode.Common.SourceToken[] V_4,
class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxNode[] V_5,
class CilBrowser.Core.SyntaxModel.SyntaxProvider V_6,
bool V_7)
nop
ldarg.1
callvirt instance string [netstandard]System.String::ToLower()
starg.s 1
ldarg.1
ldstr ".il"
call bool CilBrowser.Core.Utils::StrEquals(string, string)
brtrue.s IL_0001
ldarg.1
ldstr ".cil"
call bool CilBrowser.Core.Utils::StrEquals(string, string)
br.s IL_0002
IL_0001: ldc.i4.1
IL_0002: stloc.0
ldloc.0
brfalse.s IL_0003
nop
ldarg.0
call class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxNode[] [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxReader::ReadAllNodes(string)
stloc.1
br IL_0009
IL_0003: ldarg.1
ldstr ".txt"
call bool CilBrowser.Core.Utils::StrEquals(string, string)
brtrue.s IL_0004
ldarg.1
ldstr ".md"
call bool CilBrowser.Core.Utils::StrEquals(string, string)
br.s IL_0005
IL_0004: ldc.i4.1
IL_0005: stloc.2
ldloc.2
brfalse.s IL_0006
nop
ldarg.0
ldarg.1
call class [netstandard]System.Collections.Generic.IEnumerable`1<class [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxTokenDefinition> [CilTools.SourceCode]CilTools.SourceCode.Common.SourceCodeUtils::GetTokenDefinitions(string)
ldsfld class CilTools.SourceCode.Common.UnknownTokenFactory CilTools.SourceCode.Common.UnknownTokenFactory::Value
call class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxNode[] [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxReader::ReadAllNodes(string, class [netstandard]System.Collections.Generic.IEnumerable`1<class [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxTokenDefinition>, class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxFactory)
stloc.1
br.s IL_0009
IL_0006: ldsfld class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.SyntaxModel.SourceParser::s_markupExts
ldarg.1
callvirt instance bool class [netstandard]System.Collections.Generic.HashSet`1<string>::Contains(!0)
stloc.3
ldloc.3
brfalse.s IL_0007
nop
ldarg.0
call class [CilTools.SourceCode]CilTools.SourceCode.Common.SourceToken[] CilBrowser.Core.SyntaxModel.SourceParser::ParseXmlTokens(string)
stloc.s V_4
ldloc.s V_4
call class CilBrowser.Core.SyntaxModel.SyntaxElementDefinition[] CilBrowser.Core.SyntaxModel.SyntaxElementDefinition::GetMarkupDefs()
call class CilBrowser.Core.SyntaxModel.SyntaxElement[] CilBrowser.Core.SyntaxModel.SyntaxElementReader::ParseElements(class [netstandard]System.Collections.Generic.IEnumerable`1<class [CilTools.SourceCode]CilTools.SourceCode.Common.SourceToken>, class [netstandard]System.Collections.Generic.IEnumerable`1<class CilBrowser.Core.SyntaxModel.SyntaxElementDefinition>)
stloc.s V_5
ldloc.s V_5
stloc.1
br.s IL_0009
IL_0007: nop
ldsfld class [netstandard]System.Collections.Generic.Dictionary`2<string, class CilBrowser.Core.SyntaxModel.SyntaxProvider> CilBrowser.Core.SyntaxModel.SourceParser::s_map
ldarg.1
ldloca.s V_6
callvirt instance bool class [netstandard]System.Collections.Generic.Dictionary`2<string, class CilBrowser.Core.SyntaxModel.SyntaxProvider>::TryGetValue(!0, !1&)
stloc.s V_7
ldloc.s V_7
brfalse.s IL_0008
nop
ldloc.s V_6
ldarg.0
callvirt instance class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxNode[] CilBrowser.Core.SyntaxModel.SyntaxProvider::GetNodes(string)
stloc.1
br.s IL_0009
IL_0008: nop
ldarg.0
ldarg.1
call class [netstandard]System.Collections.Generic.IEnumerable`1<class [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxTokenDefinition> [CilTools.SourceCode]CilTools.SourceCode.Common.SourceCodeUtils::GetTokenDefinitions(string)
ldarg.1
call class [CilTools.SourceCode]CilTools.SourceCode.Common.SourceTokenFactory [CilTools.SourceCode]CilTools.SourceCode.Common.SourceCodeUtils::GetFactory(string)
call class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxNode[] [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxReader::ReadAllNodes(string, class [netstandard]System.Collections.Generic.IEnumerable`1<class [CilTools.BytecodeAnalysis]CilTools.Syntax.Tokens.SyntaxTokenDefinition>, class [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxFactory)
stloc.1
br.s IL_0009
IL_0009: ldloc.1
ret
}
.method assembly hidebysig static valuetype [CilTools.SourceCode]CilTools.SourceCode.Common.TokenKind GetKindCommon(
string token
) cil managed
{
.maxstack 3
.locals init (bool V_0,
valuetype [CilTools.SourceCode]CilTools.SourceCode.Common.TokenKind V_1,
bool V_2,
bool V_3,
bool V_4,
bool V_5,
bool V_6,
bool V_7,
bool V_8,
bool V_9,
bool V_10,
bool V_11,
bool V_12)
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 IL_0019
IL_0001: ldarg.0
ldc.i4.0
callvirt instance char [netstandard]System.String::get_Chars(int32)
call bool [netstandard]System.Char::IsDigit(char)
stloc.2
ldloc.2
brfalse.s IL_0002
nop
ldc.i4.s 9
stloc.1
br IL_0019
IL_0002: ldarg.0
ldc.i4.0
callvirt instance char [netstandard]System.String::get_Chars(int32)
ldc.i4.s 34
ceq
stloc.3
ldloc.3
brfalse.s IL_0006
nop
ldarg.0
callvirt instance int32 [netstandard]System.String::get_Length()
ldc.i4.2
blt.s IL_0003
ldarg.0
ldarg.0
callvirt instance int32 [netstandard]System.String::get_Length()
ldc.i4.1
sub
callvirt instance char [netstandard]System.String::get_Chars(int32)
ldc.i4.s 34
ceq
ldc.i4.0
ceq
br.s IL_0004
IL_0003: ldc.i4.1
IL_0004: stloc.s V_4
ldloc.s V_4
brfalse.s IL_0005
nop
ldc.i4.0
stloc.1
br IL_0019
IL_0005: nop
ldc.i4.7
stloc.1
br IL_0019
IL_0006: ldarg.0
ldc.i4.0
callvirt instance char [netstandard]System.String::get_Chars(int32)
ldc.i4.s 39
ceq
stloc.s V_5
ldloc.s V_5
brfalse.s IL_0010
nop
ldarg.0
callvirt instance int32 [netstandard]System.String::get_Length()
ldc.i4.2
blt.s IL_0007
ldarg.0
ldarg.0
callvirt instance int32 [netstandard]System.String::get_Length()
ldc.i4.1
sub
callvirt instance char [netstandard]System.String::get_Chars(int32)
ldc.i4.s 39
ceq
ldc.i4.0
ceq
br.s IL_0008
IL_0007: ldc.i4.1
IL_0008: stloc.s V_6
ldloc.s V_6
brfalse.s IL_0009
nop
ldc.i4.0
stloc.1
br IL_0019
IL_0009: nop
ldc.i4.6
stloc.1
br IL_0019
IL_0010: ldarg.0
ldc.i4.0
callvirt instance char [netstandard]System.String::get_Chars(int32)
ldc.i4.s 47
ceq
stloc.s V_7
ldloc.s V_7
brfalse.s IL_0015
nop
ldarg.0
callvirt instance int32 [netstandard]System.String::get_Length()
ldc.i4.1
ceq
stloc.s V_8
ldloc.s V_8
brfalse.s IL_0011
nop
ldc.i4.5
stloc.1
br.s IL_0019
IL_0011: ldarg.0
ldc.i4.1
callvirt instance char [netstandard]System.String::get_Chars(int32)
ldc.i4.s 42
ceq
stloc.s V_9
ldloc.s V_9
brfalse.s IL_0013
nop
ldarg.0
ldstr "*/"
ldc.i4.4
callvirt instance bool [netstandard]System.String::EndsWith(string, valuetype [netstandard]System.StringComparison)
ldc.i4.0
ceq
stloc.s V_10
ldloc.s V_10
brfalse.s IL_0012
nop
ldc.i4.0
stloc.1
br.s IL_0019
IL_0012: nop
ldc.i4.s 11
stloc.1
br.s IL_0019
IL_0013: ldarg.0
ldc.i4.1
callvirt instance char [netstandard]System.String::get_Chars(int32)
ldc.i4.s 47
ceq
stloc.s V_11
ldloc.s V_11
brfalse.s IL_0014
nop
ldc.i4.s 10
stloc.1
br.s IL_0019
IL_0014: nop
ldc.i4.0
stloc.1
br.s IL_0019
IL_0015: ldarg.0
ldc.i4.0
callvirt instance char [netstandard]System.String::get_Chars(int32)
call bool [netstandard]System.Char::IsPunctuation(char)
brtrue.s IL_0016
ldarg.0
ldc.i4.0
callvirt instance char [netstandard]System.String::get_Chars(int32)
call bool [netstandard]System.Char::IsSymbol(char)
br.s IL_0017
IL_0016: ldc.i4.1
IL_0017: stloc.s V_12
ldloc.s V_12
brfalse.s IL_0018
nop
ldc.i4.5
stloc.1
br.s IL_0019
IL_0018: nop
ldc.i4.0
stloc.1
br.s IL_0019
IL_0019: ldloc.1
ret
}
}
|