Converts JSON text into a series of tokens.
コード例 #1
0
        //     INITIALIZATION
        //_________________________________________________________________________________________

        /// <summary>
        /// Creates a JSONParser instance with the given lexer supplying the tokens.
        /// </summary>
        /// <param name="engine"> The associated script engine. </param>
        /// <param name="lexer"> The lexical analyser that provides the tokens. </param>
        public JSONParser(ScriptEngine engine, JSONLexer lexer)
        {
            if (engine == null)
                throw new ArgumentNullException("engine");
            if (lexer == null)
                throw new ArgumentNullException("lexer");
            this.engine = engine;
            this.lexer = lexer;
            this.Consume();
        }
コード例 #2
0
        //     INITIALIZATION
        //_________________________________________________________________________________________

        /// <summary>
        /// Creates a JSONParser instance with the given lexer supplying the tokens.
        /// </summary>
        /// <param name="engine"> The associated script engine. </param>
        /// <param name="lexer"> The lexical analyser that provides the tokens. </param>
        public JSONParser(ScriptEngine engine, JSONLexer lexer)
        {
            if (engine == null)
            {
                throw new ArgumentNullException("engine");
            }
            if (lexer == null)
            {
                throw new ArgumentNullException("lexer");
            }
            this.engine = engine;
            this.lexer  = lexer;
            this.Consume();
        }