Linus Groh
9e80c67608
LibJS: Fix "use strict" directive false positives
...
By having the "is this a use strict directive?" logic in
parse_string_literal() we would apply it to *any* string literal, which
is incorrect and would lead to false positives - e.g.:
"use strict" + 1
`"use strict"`
"\123"; ({"use strict": ...})
Relevant part from the spec which is now implemented properly:
[...] and where each ExpressionStatement in the sequence consists
entirely of a StringLiteral token [...]
I also got rid of UseStrictDirectiveState which is not needed anymore.
Fixes #3903 .
2020-11-02 13:13:54 +01:00
..
2020-10-29 22:27:55 +01:00
2020-10-20 20:27:58 +02:00
2020-10-25 19:45:47 +01:00
2020-10-02 16:03:17 +02:00
2020-10-28 21:11:32 +01:00
2020-10-05 17:57:26 +02:00
2020-07-06 23:40:35 +02:00
2020-07-06 23:40:35 +02:00
2020-10-08 23:27:16 +02:00
2020-10-29 22:28:15 +01:00
2020-09-12 11:29:39 +02:00
2020-10-30 23:43:38 +01:00
2020-07-06 23:40:35 +02:00
2020-07-14 20:15:19 +02:00
2020-07-11 23:13:29 +02:00
2020-07-06 23:40:35 +02:00
2020-07-06 23:40:35 +02:00
2020-09-12 11:29:39 +02:00
2020-07-06 23:40:35 +02:00
2020-10-02 16:03:17 +02:00
2020-10-31 15:25:12 +01:00
2020-07-06 23:40:35 +02:00
2020-10-05 09:25:04 +02:00
2020-10-08 23:27:16 +02:00
2020-07-06 23:40:35 +02:00
2020-07-06 23:40:35 +02:00
2020-10-28 21:11:32 +01:00
2020-10-20 20:27:58 +02:00
2020-10-08 10:02:47 +02:00
2020-07-06 23:40:35 +02:00
2020-07-09 23:33:00 +02:00
2020-07-14 17:58:42 +02:00
2020-10-23 19:13:06 +02:00
2020-10-29 22:27:55 +01:00
2020-07-06 23:40:35 +02:00
2020-07-06 23:40:35 +02:00
2020-10-08 23:23:55 +02:00
2020-10-04 10:46:12 +02:00
2020-07-06 23:40:35 +02:00
2020-10-29 11:52:31 +01:00
2020-07-06 23:40:35 +02:00
2020-10-19 11:30:14 +02:00
2020-07-06 23:40:35 +02:00
2020-07-06 23:40:35 +02:00
2020-10-25 15:16:47 +01:00
2020-10-28 21:11:32 +01:00
2020-10-28 21:11:32 +01:00
2020-07-06 23:40:35 +02:00
2020-07-06 23:40:35 +02:00
2020-07-06 23:40:35 +02:00
2020-09-12 09:31:16 +02:00
2020-10-24 16:34:01 +02:00
2020-07-06 23:40:35 +02:00
2020-07-06 23:40:35 +02:00
2020-11-02 13:13:54 +01:00
2020-07-06 23:40:35 +02:00
2020-07-06 23:40:35 +02:00
2020-07-06 23:40:35 +02:00