add unicode flag support to regex

This commit is contained in:
Sebastian McKenzie
2014-10-19 18:01:34 +11:00
committed by Marijn Haverbeke
parent fd79ac5879
commit f48503cd31
3 changed files with 117 additions and 4 deletions

View File

@@ -14792,6 +14792,35 @@ test("func(...a, b)", {
locations: true
});
test("/[a-z]/u", {
type: "Program",
body: [
{
type: "ExpressionStatement",
expression: {
type: "Literal",
regex: {
pattern: "[a-z]",
flags: "u"
},
loc: {
start: {
line: 1,
column: 0
},
end: {
line: 1,
column: 8
}
}
}
}
]
}, {
locations: true,
ecmaVersion: 6
});
// Harmony Invalid syntax
testFail("0o", "Expected number in radix 8 (1:2)", {ecmaVersion: 6});