diff --git a/acorn.js b/acorn.js index d1fda1ad68..6b3d3e9779 100644 --- a/acorn.js +++ b/acorn.js @@ -789,7 +789,7 @@ size = input.charCodeAt(tokPos + 2) === 61 ? 3 : 2; return finishOp(_relational, size); } - if (next === 47) { + if (code === 60 && next === 47) { // '/text': { + type: "ExpressionStatement", + start: 0, + end: 16, + expression: { + type: "XJSElement", + start: 0, + end: 16, + openingElement: { + type: "XJSOpeningElement", + start: 0, + end: 5, + attributes: [], + name: { + type: "XJSIdentifier", + start: 1, + end: 4, + name: "div" + }, + selfClosing: false + }, + closingElement: { + type: "XJSClosingElement", + start: 10, + end: 16, + name: { + type: "XJSIdentifier", + start: 12, + end: 15, + name: "div" + } + }, + children: [{ + type: "Literal", + start: 5, + end: 10, + value: "/text", + raw: "/text" + }] + } } } };