This repository was archived by the owner on Jun 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
tests/parsing/grammar/expressions Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3782,7 +3782,7 @@ and parseAtomicTypExpr ~attrs p =
3782
3782
and parsePackageType ~startPos ~attrs p =
3783
3783
let modTypePath = parseModuleLongIdent ~lowercase: true p in
3784
3784
begin match p.Parser. token with
3785
- | With ->
3785
+ | Lident "with" ->
3786
3786
Parser. next p;
3787
3787
let constraints = parsePackageConstraints p in
3788
3788
let loc = mkLoc startPos p.prevEndPos in
@@ -5769,7 +5769,7 @@ and parseFunctorModuleType p =
5769
5769
5770
5770
and parseWithConstraints moduleType p =
5771
5771
match p.Parser. token with
5772
- | With ->
5772
+ | Lident "with" ->
5773
5773
Parser. next p;
5774
5774
let first = parseWithConstraint p in
5775
5775
let rec loop p acc =
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ type t =
55
55
| Include
56
56
| Module
57
57
| Of
58
- | With
59
58
| Land | Lor
60
59
| Band (* Bitwise and: & *)
61
60
| BangEqual | BangEqualEqual
@@ -143,7 +142,6 @@ let toString = function
143
142
| Include -> " include"
144
143
| Module -> " module"
145
144
| Of -> " of"
146
- | With -> " with"
147
145
| Lor -> " ||"
148
146
| Band -> " &" | Land -> " &&"
149
147
| BangEqual -> " !=" | BangEqualEqual -> " !=="
@@ -191,15 +189,14 @@ let keywordTable = function
191
189
| "type" -> Typ
192
190
| "when" -> When
193
191
| "while" -> While
194
- | "with" -> With
195
192
| _ -> raise Not_found
196
193
[@@ raises Not_found ]
197
194
198
195
let isKeyword = function
199
196
| And | As | Assert | Constraint | Else | Exception | Export
200
197
| External | False | For | If | Import | In | Include | Land | Lazy
201
198
| Let | List | Lor | Module | Mutable | Of | Open | Private | Rec
202
- | Switch | True | Try | Typ | When | While | With -> true
199
+ | Switch | True | Try | Typ | When | While -> true
203
200
| _ -> false
204
201
205
202
let lookupKeyword str =
Original file line number Diff line number Diff line change @@ -531,7 +531,8 @@ let x = _ident_ident
531
531
let x = _ident_ident_
532
532
let x = __ident__
533
533
let x = list
534
- let x = Foo.Bar.list"
534
+ let x = Foo.Bar.list
535
+ let with = with"
535
536
` ;
536
537
537
538
exports [` if.js 1` ] = `
Original file line number Diff line number Diff line change @@ -9,3 +9,5 @@ let x = __ident__
9
9
10
10
let x = list
11
11
let x = Foo . Bar . list
12
+
13
+ let with = with
You can’t perform that action at this time.
0 commit comments