import conditionalRegex from "../../../../lib/conditional-regex-value.js"; export default { "type": "Program", "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } }, "range": [ 0, 17 ], "body": [ { "type": "VariableDeclaration", "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } }, "range": [ 0, 17 ], "declarations": [ { "type": "VariableDeclarator", "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 16 } }, "range": [ 4, 16 ], "id": { "type": "Identifier", "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } }, "range": [ 4, 7 ], "name": "foo" }, "init": conditionalRegex({ "type": "Literal", "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } }, "range": [ 10, 16 ], "value": null, "raw": "/foo/u", "regex": { "pattern": "foo", "flags": "u" } }) } ], "kind": "var" } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } }, "range": [ 0, 3 ] }, { "type": "Identifier", "value": "foo", "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } }, "range": [ 4, 7 ] }, { "type": "Punctuator", "value": "=", "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } }, "range": [ 8, 9 ] }, { "type": "RegularExpression", "value": "/foo/u", "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } }, "range": [ 10, 16 ], "regex": { "flags": "u", "pattern": "foo" } }, { "type": "Punctuator", "value": ";", "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } }, "range": [ 16, 17 ] } ] };