Ejemplo n.º 1
0
        private Syntax.BLOCK ParseCompound(bool create_table = true)
        {
            if (scan.Peek().type != Token.Type.LBRACE)
            {
                return(null);
            }
            scan.Read();

            if (create_table)
            {
                tstack.NewTable();
            }

            Syntax.BLOCK res = null;

            try
            {
                this.parse_block = true;
                res = new Syntax.BLOCK(ParseBlockItemList());
                this.parse_block = false;
            }
            catch (Exception e)
            {
                throw e;
            }

            if (create_table)
            {
                tstack.StepUp();
            }
            return(res);
        }
Ejemplo n.º 2
0
        private Syntax.BLOCK ParseCompound(bool create_table = true)
        {
            if (scan.Peek().type != Token.Type.LBRACE)
            {
                return null;
            }
            scan.Read();

            if (create_table)
            {
                tstack.NewTable();
            }

            Syntax.BLOCK res = null;

            try
            {
                this.parse_block = true;
                res = new Syntax.BLOCK(ParseBlockItemList());
                this.parse_block = false;
            }
            catch (Exception e)
            {
                throw e;
            }

            if (create_table)
            {
                tstack.StepUp();
            }
            return res;
        }