| @@ -19,7 +19,7 | |||
| 
             | 
        19 | 19 | }, | 
| 
             | 
        20 | 20 | reason => { | 
| 
             | 
        21 | 21 | TraceContext.Instance.EnterLogicalOperation(op,true); | 
| 
             | 
        22 | TraceLog.TraceInformation("promise cancelled {0}", reason.Message); | |
| 
             | 
        22 | TraceLog.TraceInformation("promise cancelled {0}", reason == null ? "<no-reason>" : reason.Message); | |
| 
             | 
        23 | 23 | TraceLog.EndLogicalOperation(); | 
| 
             | 
        24 | 24 | TraceContext.Instance.Leave(); | 
| 
             | 
        25 | 25 | } | 
| @@ -46,10 +46,11 namespace Implab.JSON { | |||
| 
             | 
        46 | 46 | static readonly DFAStateDescriptior[] _arrayDFA; | 
| 
             | 
        47 | 47 | |
| 
             | 
        48 | 48 | static JSONParser() { | 
| 
             | 
        49 | var jsonExpression = Token.New(JsonTokenType.BeginObject, JsonTokenType.BeginArray).Tag(0); | |
| 
             | 
        49 | ||
| 
             | 
        50 | 50 | |
| 
             | 
        51 | 51 | var valueExpression = Token.New(JsonTokenType.BeginArray, JsonTokenType.BeginObject, JsonTokenType.Literal, JsonTokenType.Number, JsonTokenType.String); | 
| 
             | 
        52 | 52 | var memberExpression = Token.New(JsonTokenType.String).Cat(Token.New(JsonTokenType.NameSeparator)).Cat(valueExpression); | 
| 
             | 
        53 | ||
| 
             | 
        53 | 54 | var objectExpression = memberExpression | 
| 
             | 
        54 | 55 | .Cat( | 
| 
             | 
        55 | 56 | Token.New(JsonTokenType.ValueSeparator) | 
| @@ -69,6 +70,8 namespace Implab.JSON { | |||
| 
             | 
        69 | 70 | .Cat(Token.New(JsonTokenType.EndArray)) | 
| 
             | 
        70 | 71 | .Tag(0); | 
| 
             | 
        71 | 72 | |
| 
             | 
        73 | var jsonExpression = valueExpression.Tag(0); | |
| 
             | 
        74 | ||
| 
             | 
        72 | 75 | _jsonDFA = BuildDFA(jsonExpression).States; | 
| 
             | 
        73 | 76 | _objectDFA = BuildDFA(objectExpression).States; | 
| 
             | 
        74 | 77 | _arrayDFA = BuildDFA(arrayExpression).States; | 
        
        General Comments 0
    
    
  
  
                      You need to be logged in to leave comments.
                      Login now
                    
                