This repository was archived by the owner on Jun 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
bsc.exe on master complains about invalid escape codes in strings while 9.1.4 is fine #473
Closed
Milestone
Comments
I just built rescript from master with the latest version of the syntax module and ran into this, too. @ryyppy This is a regression that we need to fix for the next release. Could you label it as such? Looking at the AST,
whereas
gives us
|
@cknitt I think I know what the problem is. Will add it here to this issue |
@IwanKaramazow Great! Thanks a lot! |
IwanKaramazow
pushed a commit
to rescript-lang/rescript
that referenced
this issue
May 24, 2022
Fixes rescript-lang/syntax#473 The [ecmascript spec](https://tc39.es/ecma262/#prod-CharacterEscapeSequence) states that both `SingleEscapeCharacter` and `NonEscapeCharacter` are valid escape sequences. Previously escape sequences containing a `NonEscapeCharacter`, any regular char like `a` in`"\a"`, would throw the "Invalid escape code" error. ReScript strings should have the same semantics as JS.
IwanKaramazow
pushed a commit
to rescript-lang/rescript
that referenced
this issue
May 24, 2022
Fixes rescript-lang/syntax#473 The [ecmascript spec](https://tc39.es/ecma262/#prod-CharacterEscapeSequence) states that both `SingleEscapeCharacter` and `NonEscapeCharacter` are valid escape sequences. Previously escape sequences containing a `NonEscapeCharacter`, any regular char like `a` in`"\a"`, would throw the "Invalid escape code" error. ReScript strings should have the same semantics as JS.
cristianoc
pushed a commit
to rescript-lang/rescript
that referenced
this issue
May 26, 2022
Fixes rescript-lang/syntax#473 The [ecmascript spec](https://tc39.es/ecma262/#prod-CharacterEscapeSequence) states that both `SingleEscapeCharacter` and `NonEscapeCharacter` are valid escape sequences. Previously escape sequences containing a `NonEscapeCharacter`, any regular char like `a` in`"\a"`, would throw the "Invalid escape code" error. ReScript strings should have the same semantics as JS.
mununki
pushed a commit
to mununki/rescript-compiler
that referenced
this issue
Jul 15, 2022
Fixes rescript-lang/syntax#473 The [ecmascript spec](https://tc39.es/ecma262/#prod-CharacterEscapeSequence) states that both `SingleEscapeCharacter` and `NonEscapeCharacter` are valid escape sequences. Previously escape sequences containing a `NonEscapeCharacter`, any regular char like `a` in`"\a"`, would throw the "Invalid escape code" error. ReScript strings should have the same semantics as JS.
anmonteiro
pushed a commit
to melange-re/melange
that referenced
this issue
Jan 11, 2023
Fixes rescript-lang/syntax#473 The [ecmascript spec](https://tc39.es/ecma262/#prod-CharacterEscapeSequence) states that both `SingleEscapeCharacter` and `NonEscapeCharacter` are valid escape sequences. Previously escape sequences containing a `NonEscapeCharacter`, any regular char like `a` in`"\a"`, would throw the "Invalid escape code" error. ReScript strings should have the same semantics as JS.
anmonteiro
pushed a commit
to melange-re/melange
that referenced
this issue
Jan 11, 2023
Fixes rescript-lang/syntax#473 The [ecmascript spec](https://tc39.es/ecma262/#prod-CharacterEscapeSequence) states that both `SingleEscapeCharacter` and `NonEscapeCharacter` are valid escape sequences. Previously escape sequences containing a `NonEscapeCharacter`, any regular char like `a` in`"\a"`, would throw the "Invalid escape code" error. ReScript strings should have the same semantics as JS. Co-authored-by: Maxim <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following code:
works fine using the published 9.1.4 version, but produces the following error when running bsc.exe compiled from
master
:The same happens with escaped single quotes as well.
This also happens for byte escape codes. The following code:
works fine with 9.1.4, but produces the follow error when running bsc.exe compiled from
master
:The text was updated successfully, but these errors were encountered: