.NET CIL Browser - CilBrowser.Core

Type: CilBrowser.Core.SyntaxModel.FoxPro.FoxTokenFactory

Types in CilBrowser.Core.SyntaxModel.FoxPro namespace:

FoxCommentToken

FoxSyntaxProvider

FoxTextLiteralToken

FoxTokenFactory

.class public auto ansi sealed beforefieldinit CilBrowser.Core.SyntaxModel.FoxPro.FoxTokenFactory
extends [CilTools.BytecodeAnalysis]CilTools.Syntax.SyntaxFactory
{

 .field private static initonly class [netstandard]System.Collections.Generic.HashSet`1<string> sqlKeywords
 .field private static initonly class [netstandard]System.Collections.Generic.HashSet`1<string> foxKeywords
 .field public static initonly class CilBrowser.Core.SyntaxModel.FoxPro.FoxTokenFactory 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     40
           newarr       [netstandard]System.String
           dup          
           ldc.i4.0     
           ldstr        "ALL"
           stelem.ref   
           dup          
           ldc.i4.1     
           ldstr        "ALTER"
           stelem.ref   
           dup          
           ldc.i4.2     
           ldstr        "AND"
           stelem.ref   
           dup          
           ldc.i4.3     
           ldstr        "ANY"
           stelem.ref   
           dup          
           ldc.i4.4     
           ldstr        "AS"
           stelem.ref   
           dup          
           ldc.i4.5     
           ldstr        "ASC"
           stelem.ref   
           dup          
           ldc.i4.6     
           ldstr        "BETWEEN"
           stelem.ref   
           dup          
           ldc.i4.7     
           ldstr        "BY"
           stelem.ref   
           dup          
           ldc.i4.8     
           ldstr        "CREATE"
           stelem.ref   
           dup          
           ldc.i4.s     9
           ldstr        "COUNT"
           stelem.ref   
           dup          
           ldc.i4.s     10
           ldstr        "DATABASE"
           stelem.ref   
           dup          
           ldc.i4.s     11
           ldstr        "DELETE"
           stelem.ref   
           dup          
           ldc.i4.s     12
           ldstr        "DESC"
           stelem.ref   
           dup          
           ldc.i4.s     13
           ldstr        "DISTINCT"
           stelem.ref   
           dup          
           ldc.i4.s     14
           ldstr        "DROP"
           stelem.ref   
           dup          
           ldc.i4.s     15
           ldstr        "EXISTS"
           stelem.ref   
           dup          
           ldc.i4.s     16
           ldstr        "FROM"
           stelem.ref   
           dup          
           ldc.i4.s     17
           ldstr        "GROUP"
           stelem.ref   
           dup          
           ldc.i4.s     18
           ldstr        "HAVING"
           stelem.ref   
           dup          
           ldc.i4.s     19
           ldstr        "IN"
           stelem.ref   
           dup          
           ldc.i4.s     20
           ldstr        "IS"
           stelem.ref   
           dup          
           ldc.i4.s     21
           ldstr        "INDEX"
           stelem.ref   
           dup          
           ldc.i4.s     22
           ldstr        "INSERT"
           stelem.ref   
           dup          
           ldc.i4.s     23
           ldstr        "INTO"
           stelem.ref   
           dup          
           ldc.i4.s     24
           ldstr        "JOIN"
           stelem.ref   
           dup          
           ldc.i4.s     25
           ldstr        "KEY"
           stelem.ref   
           dup          
           ldc.i4.s     26
           ldstr        "LIKE"
           stelem.ref   
           dup          
           ldc.i4.s     27
           ldstr        "NOT"
           stelem.ref   
           dup          
           ldc.i4.s     28
           ldstr        "NULL"
           stelem.ref   
           dup          
           ldc.i4.s     29
           ldstr        "ON"
           stelem.ref   
           dup          
           ldc.i4.s     30
           ldstr        "OR"
           stelem.ref   
           dup          
           ldc.i4.s     31
           ldstr        "ORDER"
           stelem.ref   
           dup          
           ldc.i4.s     32
           ldstr        "SELECT"
           stelem.ref   
           dup          
           ldc.i4.s     33
           ldstr        "TABLE"
           stelem.ref   
           dup          
           ldc.i4.s     34
           ldstr        "VALUES"
           stelem.ref   
           dup          
           ldc.i4.s     35
           ldstr        "VIEW"
           stelem.ref   
           dup          
           ldc.i4.s     36
           ldstr        "UNION"
           stelem.ref   
           dup          
           ldc.i4.s     37
           ldstr        "UPDATE"
           stelem.ref   
           dup          
           ldc.i4.s     38
           ldstr        "WHERE"
           stelem.ref   
           dup          
           ldc.i4.s     39
           ldstr        "WITH"
           stelem.ref   
           call         class [netstandard]System.StringComparer [netstandard]System.StringComparer::get_OrdinalIgnoreCase()
           newobj       instance void class [netstandard]System.Collections.Generic.HashSet`1<string>::.ctor(class [netstandard]System.Collections.Generic.IEnumerable`1<!0>, class [netstandard]System.Collections.Generic.IEqualityComparer`1<!0>)
           stsfld       class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.SyntaxModel.FoxPro.FoxTokenFactory::sqlKeywords
           ldc.i4.s     37
           newarr       [netstandard]System.String
           dup          
           ldc.i4.0     
           ldstr        "ARRAY"
           stelem.ref   
           dup          
           ldc.i4.1     
           ldstr        "CALL"
           stelem.ref   
           dup          
           ldc.i4.2     
           ldstr        "CASE"
           stelem.ref   
           dup          
           ldc.i4.3     
           ldstr        "CATCH"
           stelem.ref   
           dup          
           ldc.i4.4     
           ldstr        "CLASS"
           stelem.ref   
           dup          
           ldc.i4.5     
           ldstr        "CLOSE"
           stelem.ref   
           dup          
           ldc.i4.6     
           ldstr        "CONTINUE"
           stelem.ref   
           dup          
           ldc.i4.7     
           ldstr        "CURSOR"
           stelem.ref   
           dup          
           ldc.i4.8     
           ldstr        "DECLARE"
           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        "ENDCASE"
           stelem.ref   
           dup          
           ldc.i4.s     12
           ldstr        "ENDDO"
           stelem.ref   
           dup          
           ldc.i4.s     13
           ldstr        "ENDIF"
           stelem.ref   
           dup          
           ldc.i4.s     14
           ldstr        "ENDSCAN"
           stelem.ref   
           dup          
           ldc.i4.s     15
           ldstr        "ENDTRY"
           stelem.ref   
           dup          
           ldc.i4.s     16
           ldstr        "ENDWITH"
           stelem.ref   
           dup          
           ldc.i4.s     17
           ldstr        "EXIT"
           stelem.ref   
           dup          
           ldc.i4.s     18
           ldstr        "FORM"
           stelem.ref   
           dup          
           ldc.i4.s     19
           ldstr        "FUNCTION"
           stelem.ref   
           dup          
           ldc.i4.s     20
           ldstr        "IF"
           stelem.ref   
           dup          
           ldc.i4.s     21
           ldstr        "GO"
           stelem.ref   
           dup          
           ldc.i4.s     22
           ldstr        "GOTO"
           stelem.ref   
           dup          
           ldc.i4.s     23
           ldstr        "NEXT"
           stelem.ref   
           dup          
           ldc.i4.s     24
           ldstr        "PARAMETERS"
           stelem.ref   
           dup          
           ldc.i4.s     25
           ldstr        "PROCEDURE"
           stelem.ref   
           dup          
           ldc.i4.s     26
           ldstr        "REPLACE"
           stelem.ref   
           dup          
           ldc.i4.s     27
           ldstr        "RETURN"
           stelem.ref   
           dup          
           ldc.i4.s     28
           ldstr        "SCAN"
           stelem.ref   
           dup          
           ldc.i4.s     29
           ldstr        "SET"
           stelem.ref   
           dup          
           ldc.i4.s     30
           ldstr        "SKIP"
           stelem.ref   
           dup          
           ldc.i4.s     31
           ldstr        "STORE"
           stelem.ref   
           dup          
           ldc.i4.s     32
           ldstr        "TABLES"
           stelem.ref   
           dup          
           ldc.i4.s     33
           ldstr        "TO"
           stelem.ref   
           dup          
           ldc.i4.s     34
           ldstr        "TRY"
           stelem.ref   
           dup          
           ldc.i4.s     35
           ldstr        "USE"
           stelem.ref   
           dup          
           ldc.i4.s     36
           ldstr        "WAIT"
           stelem.ref   
           call         class [netstandard]System.StringComparer [netstandard]System.StringComparer::get_OrdinalIgnoreCase()
           newobj       instance void class [netstandard]System.Collections.Generic.HashSet`1<string>::.ctor(class [netstandard]System.Collections.Generic.IEnumerable`1<!0>, class [netstandard]System.Collections.Generic.IEqualityComparer`1<!0>)
           stsfld       class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.SyntaxModel.FoxPro.FoxTokenFactory::foxKeywords
           newobj       instance void CilBrowser.Core.SyntaxModel.FoxPro.FoxTokenFactory::.ctor()
           stsfld       class CilBrowser.Core.SyntaxModel.FoxPro.FoxTokenFactory CilBrowser.Core.SyntaxModel.FoxPro.FoxTokenFactory::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,
     bool V_4,
     bool V_5,
     bool V_6,
     bool V_7,
     bool V_8,
     bool V_9)

           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_0018
  IL_0001: ldsfld       class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.SyntaxModel.FoxPro.FoxTokenFactory::sqlKeywords
           ldarg.0      
           callvirt     instance bool class [netstandard]System.Collections.Generic.HashSet`1<string>::Contains(!0)
           brtrue.s     IL_0002
           ldsfld       class [netstandard]System.Collections.Generic.HashSet`1<string> CilBrowser.Core.SyntaxModel.FoxPro.FoxTokenFactory::foxKeywords
           ldarg.0      
           callvirt     instance bool class [netstandard]System.Collections.Generic.HashSet`1<string>::Contains(!0)
           br.s         IL_0003
  IL_0002: ldc.i4.1     
  IL_0003: stloc.2      
           ldloc.2      
           brfalse.s    IL_0004
           nop          
           ldc.i4.4     
           stloc.1      
           br           IL_0018
  IL_0004: ldarg.0      
           ldc.i4.0     
           callvirt     instance char [netstandard]System.String::get_Chars(int32)
           call         bool [netstandard]System.Char::IsLetter(char)
           brtrue.s     IL_0005
           ldarg.0      
           ldc.i4.0     
           callvirt     instance char [netstandard]System.String::get_Chars(int32)
           ldc.i4.s     95
           ceq          
           br.s         IL_0006
  IL_0005: ldc.i4.1     
  IL_0006: stloc.3      
           ldloc.3      
           brfalse.s    IL_0007
           nop          
           ldc.i4.1     
           stloc.1      
           br           IL_0018
  IL_0007: ldarg.0      
           ldstr        "&&"
           callvirt     instance bool [netstandard]System.String::StartsWith(string)
           stloc.s      V_4
           ldloc.s      V_4
           brfalse.s    IL_0008
           nop          
           ldc.i4.s     10
           stloc.1      
           br           IL_0018
  IL_0008: ldarg.0      
           ldc.i4.0     
           callvirt     instance char [netstandard]System.String::get_Chars(int32)
           ldc.i4.s     42
           bne.un.s     IL_0009
           ldarg.0      
           callvirt     instance int32 [netstandard]System.String::get_Length()
           ldc.i4.2     
           clt          
           ldc.i4.0     
           ceq          
           br.s         IL_0010
  IL_0009: ldc.i4.0     
  IL_0010: stloc.s      V_5
           ldloc.s      V_5
           brfalse.s    IL_0011
           nop          
           ldc.i4.s     10
           stloc.1      
           br.s         IL_0018
  IL_0011: ldarg.0      
           ldc.i4.0     
           callvirt     instance char [netstandard]System.String::get_Chars(int32)
           ldc.i4.s     39
           ceq          
           stloc.s      V_6
           ldloc.s      V_6
           brfalse.s    IL_0012
           nop          
           ldc.i4.6     
           stloc.1      
           br.s         IL_0018
  IL_0012: ldarg.0      
           ldc.i4.0     
           callvirt     instance char [netstandard]System.String::get_Chars(int32)
           ldc.i4.s     34
           ceq          
           stloc.s      V_7
           ldloc.s      V_7
           brfalse.s    IL_0013
           nop          
           ldc.i4.7     
           stloc.1      
           br.s         IL_0018
  IL_0013: ldarg.0      
           ldc.i4.0     
           callvirt     instance char [netstandard]System.String::get_Chars(int32)
           call         bool [netstandard]System.Char::IsPunctuation(char)
           brtrue.s     IL_0014
           ldarg.0      
           ldc.i4.0     
           callvirt     instance char [netstandard]System.String::get_Chars(int32)
           call         bool [netstandard]System.Char::IsSymbol(char)
           br.s         IL_0015
  IL_0014: ldc.i4.1     
  IL_0015: stloc.s      V_8
           ldloc.s      V_8
           brfalse.s    IL_0016
           nop          
           ldc.i4.5     
           stloc.1      
           br.s         IL_0018
  IL_0016: ldarg.0      
           ldc.i4.0     
           callvirt     instance char [netstandard]System.String::get_Chars(int32)
           call         bool [netstandard]System.Char::IsDigit(char)
           stloc.s      V_9
           ldloc.s      V_9
           brfalse.s    IL_0017
           nop          
           ldc.i4.s     9
           stloc.1      
           br.s         IL_0018
  IL_0017: nop          
           ldc.i4.0     
           stloc.1      
           br.s         IL_0018
  IL_0018: 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.FoxPro.FoxTokenFactory::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          
 }

}

Back to table of contents


Generated by CIL Browser