예제 #1
0
        // ECMA-262 12.2.9 Template Literals

        public Node parseTemplateElement(Options option)
        {
            Node node;
            Token token;

            if (lookahead.type != TokenType.Template || (option.head && !lookahead.head))
            {
                throwUnexpectedToken();
            }

            node = new Node();
            token = lex();

            return node.finishTemplateElement(new Node() { raw = token.value }, token.tail);
            //.raw, cooked= token.value.cooked }
        }