-
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.
feat: reduce greediness of readable binary operators
- Loading branch information
1 parent
a4cc2db
commit f240b7e
Showing
3 changed files
with
82 additions
and
5 deletions.
There are no files selected for viewing
73 changes: 70 additions & 3 deletions
73
...sts__/fixtures/attr-complex-instanceof/__snapshots__/attr-complex-instanceof.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 |
---|---|---|
@@ -1,7 +1,74 @@ | ||
1╭─ var a = 'foo' instanceof String | ||
│ │ │ │ │ ├─ closeTag(var) | ||
│ │ │ │ │ ╰─ openTagEnd(var) | ||
│ │ │ │ ╰─ attrValue.value "'foo' instanceof String" | ||
│ │ │ ╰─ attrValue "= 'foo' instanceof String" | ||
│ │ ╰─ attrName | ||
╰─ ╰─ tagName "var" | ||
╰─ ╰─ tagName "var" | ||
2╭─ | ||
╰─ ╰─ openTagEnd(var) | ||
3╭─ tag a = 'foo' instanceof = String | ||
│ │ │ │ │ │ │ ╰─ attrValue.value "String" | ||
│ │ │ │ │ │ ╰─ attrValue "= String" | ||
│ │ │ │ │ ╰─ attrName "instanceof" | ||
│ │ │ │ ╰─ attrValue.value "'foo'" | ||
│ │ │ ╰─ attrValue "= 'foo'" | ||
│ │ ╰─ attrName | ||
│ ├─ closeTag(var) | ||
╰─ ╰─ tagName "tag" | ||
4╭─ tag a = 'foo' instanceof := String | ||
│ │ │ │ │ │ │ ╰─ attrValue:bound.value "String" | ||
│ │ │ │ │ │ ╰─ attrValue:bound ":= String" | ||
│ │ │ │ │ ╰─ attrName "instanceof" | ||
│ │ │ │ ╰─ attrValue.value "'foo'" | ||
│ │ │ ╰─ attrValue "= 'foo'" | ||
│ │ ╰─ attrName | ||
│ ├─ closeTag(tag) | ||
│ ├─ openTagEnd(tag) | ||
╰─ ╰─ tagName "tag" | ||
5╭─ tag a = 'foo' instanceof= String | ||
│ │ │ │ │ │ │ ╰─ attrValue.value "String" | ||
│ │ │ │ │ │ ╰─ attrValue "= String" | ||
│ │ │ │ │ ╰─ attrName "instanceof" | ||
│ │ │ │ ╰─ attrValue.value "'foo'" | ||
│ │ │ ╰─ attrValue "= 'foo'" | ||
│ │ ╰─ attrName | ||
│ ├─ closeTag(tag) | ||
│ ├─ openTagEnd(tag) | ||
╰─ ╰─ tagName "tag" | ||
6╭─ tag a = 'foo' instanceof; | ||
│ │ │ │ │ ╰─ attrName "instanceof" | ||
│ │ │ │ ╰─ attrValue.value "'foo'" | ||
│ │ │ ╰─ attrValue "= 'foo'" | ||
│ │ ╰─ attrName | ||
│ ├─ closeTag(tag) | ||
│ ├─ openTagEnd(tag) | ||
╰─ ╰─ tagName "tag" | ||
7╭─ | ||
╰─ ╰─ openTagEnd(tag) | ||
8╭─ tag a = 'foo' instanceof, b | ||
│ │ │ │ │ │ ╰─ attrName | ||
│ │ │ │ │ ╰─ attrName "instanceof" | ||
│ │ │ │ ╰─ attrValue.value "'foo'" | ||
│ │ │ ╰─ attrValue "= 'foo'" | ||
│ │ ╰─ attrName | ||
│ ├─ closeTag(tag) | ||
╰─ ╰─ tagName "tag" | ||
9╭─ | ||
╰─ ╰─ openTagEnd(tag) | ||
10╭─ <tag a = 'foo' instanceof></tag> | ||
│ ││ │ │ │ │ ││ ╰─ closeTag(tag).value "tag" | ||
│ ││ │ │ │ │ │╰─ closeTag(tag) "</tag>" | ||
│ ││ │ │ │ │ ╰─ openTagEnd(tag) | ||
│ ││ │ │ │ ╰─ attrName "instanceof" | ||
│ ││ │ │ ╰─ attrValue.value "'foo'" | ||
│ ││ │ ╰─ attrValue "= 'foo'" | ||
│ ││ ╰─ attrName | ||
│ │╰─ tagName "tag" | ||
╰─ ╰─ closeTag(tag) | ||
11╭─ <tag a = 'foo' instanceof/> | ||
│ │ │ │ │ │ │ ╰─ closeTag(tag) | ||
│ │ │ │ │ │ ╰─ openTagEnd(tag) "/>" | ||
│ │ │ │ │ ╰─ attrName "instanceof" | ||
│ │ │ │ ╰─ attrValue.value "'foo'" | ||
│ │ │ ╰─ attrValue "= 'foo'" | ||
│ │ ╰─ attrName | ||
╰─ ╰─ tagName "tag" |
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 |
---|---|---|
@@ -1 +1,11 @@ | ||
var a = 'foo' instanceof String | ||
var a = 'foo' instanceof String | ||
|
||
tag a = 'foo' instanceof = String | ||
tag a = 'foo' instanceof := String | ||
tag a = 'foo' instanceof= String | ||
tag a = 'foo' instanceof; | ||
|
||
tag a = 'foo' instanceof, b | ||
|
||
<tag a = 'foo' instanceof></tag> | ||
<tag a = 'foo' instanceof/> |
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