-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: always consume terminator if it is preceded by an operator
- Loading branch information
1 parent
be73442
commit 085451c
Showing
6 changed files
with
103 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"htmljs-parser": patch | ||
--- | ||
|
||
Always consume next character of expression if terminator was preceded by an operator. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...s__/fixtures/tag-var-type-with-parens/__snapshots__/tag-var-type-with-parens.expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
1╭─ let/a:(B | C) = D | ||
│ │ ││ │ ╰─ attrValue.value | ||
│ │ ││ ├─ attrValue "= D" | ||
│ │ ││ ╰─ attrName | ||
│ │ │╰─ tagVar.value "a:(B | C)" | ||
│ │ ╰─ tagVar "/a:(B | C)" | ||
╰─ ╰─ tagName "let" | ||
2╭─ | ||
╰─ ╰─ openTagEnd | ||
3╭─ let/a: (B | C) = D | ||
│ │ ││ │ ╰─ attrValue.value | ||
│ │ ││ ├─ attrValue "= D" | ||
│ │ ││ ╰─ attrName | ||
│ │ │╰─ tagVar.value "a: (B | C)" | ||
│ │ ╰─ tagVar "/a: (B | C)" | ||
│ ├─ closeTagEnd(let) | ||
╰─ ╰─ tagName "let" | ||
4╭─ | ||
╰─ ╰─ openTagEnd | ||
5╭─ let/a : (B | C) = D | ||
│ │ ││ │ ╰─ attrValue.value | ||
│ │ ││ ├─ attrValue "= D" | ||
│ │ ││ ╰─ attrName | ||
│ │ │╰─ tagVar.value "a : (B | C)" | ||
│ │ ╰─ tagVar "/a : (B | C)" | ||
│ ├─ closeTagEnd(let) | ||
╰─ ╰─ tagName "let" | ||
6╭─ | ||
╰─ ╰─ openTagEnd | ||
7╭─ let/a :(B | C) = D | ||
│ │ ││ │ ╰─ attrValue.value | ||
│ │ ││ ├─ attrValue "= D" | ||
│ │ ││ ╰─ attrName | ||
│ │ │╰─ tagVar.value "a :(B | C)" | ||
│ │ ╰─ tagVar "/a :(B | C)" | ||
│ ├─ closeTagEnd(let) | ||
╰─ ╰─ tagName "let" | ||
8╭─ | ||
╰─ ╰─ openTagEnd | ||
9╭─ let/a: B & (C | D) = D | ||
│ │ ││ │ ╰─ attrValue.value | ||
│ │ ││ ├─ attrValue "= D" | ||
│ │ ││ ╰─ attrName | ||
│ │ │╰─ tagVar.value "a: B & (C | D)" | ||
│ │ ╰─ tagVar "/a: B & (C | D)" | ||
│ ├─ closeTagEnd(let) | ||
╰─ ╰─ tagName "let" | ||
10╭─ | ||
│ ├─ openTagEnd | ||
╰─ ╰─ closeTagEnd(let) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let/a:(B | C) = D | ||
|
||
let/a: (B | C) = D | ||
|
||
let/a : (B | C) = D | ||
|
||
let/a :(B | C) = D | ||
|
||
let/a: B & (C | D) = D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters