Add provisional %raw syntax for fixed external arguments
%raw("{}") writes a fixed external argument as a JavaScript literal. The @as(value) _ form is deprecated and formats as %raw(...).
Semantic Diff
7 commits
25e3dfbbe00cfabda4c97b27f2be28985c94300a..pr-8876%raw("{}") writes a fixed external argument as a JavaScript literal. The @as(value) _ form is deprecated and formats as %raw(...).
A cold build of the test repository can take over 20 seconds on Intel macOS CI, so the test now waits up to 60 seconds for the output.
A computed object key such as [f()] runs code, so it is not a literal. Also test that a %raw fixed argument survives the v0 bridge.
The output is strict, so legacy octal literals such as 007 and octal escapes are rejected.
As for @as(value) _, an attribute such as @ignore next to %raw has no effect.
Fixed values written with characters that are special in a template, such as ${, a backtick or a backslash, keep their value when the formatter migrates them to %raw(...).
Negating an array, object or regexp can run a valueOf method.