closure-compiler icon indicating copy to clipboard operation
closure-compiler copied to clipboard

Cannot convert ECMASCRIPT_2018 feature "RegExp unicode property escape"

Open haraleib opened this issue 9 months ago • 2 comments

I wonder if there is a reason why google closure-compiler can't convert the following snippet while Babel can do it. (Snippet available with the links below)

Maybe somebody can help me out here or have some input concerning this issue.

Google closure-compiler: https://closure-compiler.appspot.com/home#code%3D%252F%252F%2520%253D%253DClosureCompiler%253D%253D%250A%252F%252F%2520%2540compilation_level%2520SIMPLE_OPTIMIZATIONS%250A%252F%252F%2520%2540output_file_name%2520default.js%250A%252F%252F%2520%253D%253D%252FClosureCompiler%253D%253D%250A%250A%252F%252F%2520ADD%2520YOUR%2520CODE%2520HERE%250Afunction%2520proper(ast%252C%2520state)%2520%257B%250A%2520%2520%2520%2520return%2520this.runFunction(ast.args%252C%2520state%252C%2520this.metadata('PROPER')%252C%2520arg%2520%253D%253E%2520%257B%250A%2520%2520%2520%2520%2520%2520return%2520arg.replace(%252F%255Cp%257BL%257D%252B%252Fgu%252C%2520word%2520%253D%253E%2520word.charAt(0).toUpperCase()%2520%252B%2520word.substring(1).toLowerCase())%253B%250A%2520%2520%2520%2520%257D)%253B%250A%257D%250A%250A,

Babel: https://babeljs.io/repl#?browsers=&build=&builtIns=false&corejs=3.21&spec=false&loose=false&code_lz=GYVwdgxgLglg9mABABwE52QU1QCgIYDOUANIkXlJgJSIDeAUIk4qplCKklABYwEB0qcADFw0eGHxF-eVAHMCpcpVI8-_ALZs8AEwp4cAcgAKAJQDyxgKKnDVUrLmIAvAD46jZk1btOiR4KYyAA2eBCYOAD0ADrItAAyAL4A1JFyIKQA7nCoOi7u2bn8ENyyAIJQOAAMVPxQcACqyFioAMKEETTJiIU6_AQgAEZEqDBgcjgAjLX18XCZ2O0EnVQA3J5MiWv0iUA&debug=false&forceAllTransforms=false&modules=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env%2Cstage-2&prettier=false&targets=&version=7.22.17&externalPlugins=&assumptions=%7B%7D

haraleib avatar Sep 12 '23 08:09 haraleib