예제 #1
0
        public Node parseObjectInitializer()
        {
            List<Node> properties = new List<Node>();
            // hasProto = { value: false };
            Node node = new Node();

            expect("{");

            while (!match("}"))
            {
                properties.Add(parseObjectProperty(false));

                if (!match("}"))
                {
                    expectCommaSeparator();
                }
            }

            expect("}");

            return node.finishObjectExpression(properties);
        }