File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
tests/parsing/errors/scanner/expected Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -311,13 +311,12 @@ let scanExoticIdentifier scanner =
311
311
(String. sub [@ doesNotRaise]) scanner.src startOff (scanner.offset - startOff)
312
312
in
313
313
let name = Ext_ident. unwrap_exotic ident in
314
- let _ =
315
- if name = String. empty then
316
- let endPos = position scanner in
317
- scanner.err ~start Pos ~end Pos
318
- (Diagnostics. message " A quoted identifier can't be empty string." )
319
- in
320
- if Ext_ident. is_uident name then Token. Lident ident
314
+ if name = String. empty then (
315
+ let endPos = position scanner in
316
+ scanner.err ~start Pos ~end Pos
317
+ (Diagnostics. message " A quoted identifier can't be empty string." );
318
+ Token. Lident ident)
319
+ else if Ext_ident. is_uident name then Token. Lident ident
321
320
(* Exotic ident with uppercase letter should be encoded to avoid confusing in OCaml parsetree *)
322
321
else Token. Lident name
323
322
Original file line number Diff line number Diff line change 92
92
93
93
consecutive statements on a line must be separated by ';' or a newline
94
94
95
- type nonrec
96
- type nonrec = int
97
- let Fatal error: exception Invalid_argument("index out of bounds")
95
+ type nonrec \""
96
+ type nonrec \"" = int
97
+ let \"" = [%rescript.exprhole ]
98
+ let \"a
99
+ = b
100
+ ;;c
101
+ ;;{js| = 1
102
+ |js}
You can’t perform that action at this time.
0 commit comments