Open IgnoredAmbience opened 9 years ago
Also tests/test262/ch14/14.1/14.1-5-s.js
Hi,
From the standard: A Use Strict Directive is an ExpressionStatement in a Directive Prologue whose StringLiteral is either the exact character sequences "use strict" or 'use strict'. A Use Strict Directive may not contain an EscapeSequence or LineContinuation.
I have to admit that I’m quite impressed by this part of the standard: I really thought that escaping a string would result into the exact same behaviour. It seems EcmaScript thinks otherwise… :-\ However, I don’t know this part of the interpreter, sorry.
Martin.
tests/test262/ch14/14.1/14.1-4-s.js tests for
'use str\ ict';
Esprima outputs:
{ "type":"ExpressionStatement", "expression": { "type":"Literal", "value":"use strict", "raw":"'use str\\\r\nict'", "range": [ 579, 594 ] }
I think we're using the value instead of raw_value?
Ok, this code is in the parser module.
tests/test262/ch14/14.1/14.1-4-s.js tests for
Esprima outputs:
I think we're using the value instead of raw_value?