# HG changeset patch # User cin # Date 1403396042 -14400 # Node ID 62b440d46313099dffc61de8ebaba7d78613f06c # Parent 90069a2ec20aa8630765d546d6e2073b59ef0e39 Added Skip method to JSON parser to skip contents of the current node diff -r 90069a2ec20a -r 62b440d46313 Implab/JSON/JSONParser.cs --- a/Implab/JSON/JSONParser.cs Thu Jun 19 20:04:20 2014 +0400 +++ b/Implab/JSON/JSONParser.cs Sun Jun 22 04:14:02 2014 +0400 @@ -250,6 +250,15 @@ ~JSONParser() { Dispose(false); } + + public void Skip() { + var level = Level-1; + + Debug.Assert(level >= 0); + + while (Level != level) + Read(); + } } } diff -r 90069a2ec20a -r 62b440d46313 Implab/Parsing/DFAutomaton.cs --- a/Implab/Parsing/DFAutomaton.cs Thu Jun 19 20:04:20 2014 +0400 +++ b/Implab/Parsing/DFAutomaton.cs Sun Jun 22 04:14:02 2014 +0400 @@ -20,7 +20,7 @@ protected ContextFrame m_context; Stack m_contextStack = new Stack(); - public int Level { + protected int Level { get { return m_contextStack.Count; } }