Skip to content

Commit 2f1378b

Browse files
committed
Removed Unicode escape parsing in single line comments. The spec explicitly indicates that the behavior of JavaScript is distinct from Java in this regard.
This fixes fholm#33. Signed-off-by: John Gietzen <otac0n@gietzen.us>
1 parent a83d63a commit 2f1378b

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

Src/IronJS/Compiler.Lexer.fs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -651,26 +651,13 @@ module Lexer =
651651
let private singlelineComment (s:Input.T) =
652652
s |> bufferClear
653653
s |> advance
654-
654+
655655
let mutable loop = true
656656

657657
while s |> isvalid && loop do
658658
match s |> current with
659-
| '\\' when s |> trypeek 'u' ->
660-
s |> storePosition
661-
s |> advance
662-
663-
match s |> readUnicodeEscape with
664-
| c when c |> isLineTerminator ->
665-
s |> rewindn 5
666-
loop <- false
667-
668-
| c ->
669-
s |> advance
670-
671659
| c when c |> isLineTerminator ->
672660
loop <- false
673-
674661
| _ ->
675662
s |> advance
676663

0 commit comments

Comments
 (0)