chakra-core / ChakraCore

ChakraCore is an open source Javascript engine with a C API.
MIT License
9.13k stars 1.2k forks source link

Lift template escape sequence restrictions in tagged templates #2344

Open bakkot opened 7 years ago

bakkot commented 7 years ago

The template literal revision proposal reached stage 3 in July.

This allows

(function(strs) {
  return strs[0] === undefined && strs.raw[0] === '\\u{invalid}\\1\\xGG';
})`\u{invalid}\1\xGG`; // true

etc. Invalid escapes remain a syntax error in untagged templates.

dilijev commented 7 years ago

(Not in the official spec yet so I'm removing the ES Spec Changed tag.)

bakkot commented 7 years ago

It's now stage 4, which means it'll land in ecma262 master as soon as bterlson gets around to it.