johnpatrickmorgan / wtfautolayout

The source code for Why The Failure, Auto Layout?
https://www.wtfautolayout.com
MIT License
1.08k stars 22 forks source link

Issue parsing _UISystemBaselineConstraint #20

Closed lukaskollmer closed 3 years ago

lukaskollmer commented 4 years ago

Input:

(
    "<_UISystemBaselineConstraint:0x2828051d0 V:|-(>=NSLayoutAnchorConstraintSpace(8))-[UILabel:0x111b35c20]   (active, names: '|':ModuleName.ClassName:0x111b35a60 )>",
    "<NSLayoutConstraint:0x282805130 UILabel:0x111b35c20.centerY == ModuleName.ClassName:0x111b35a60.centerY   (active)>",
    "<NSLayoutConstraint:0x282803ed0 'UIView-Encapsulated-Layout-Height' ModuleName.ClassName:0x111b35a60.height == 0   (active)>"
)

Error message:

Line 2, Column 54
    "<_UISystemBaselineConstraint:0x2828051d0 V:|-(>=NSLayoutAnchorConstraintSpace(8))-[UILabel:0x111b35c20]   (active, names: '|':ModuleName.ClassName:0x111b35a60 )>",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
Expected: '+' in number.+
Expected: '-' in number.-
Expected: whitespace in number
Expected: digit in number
johnpatrickmorgan commented 4 years ago

Thanks for raising this issue. I don't believe I've seen NSLayoutAnchorConstraintSpace in that position previously; I will update the parser to allow for that.

johnpatrickmorgan commented 3 years ago

The fix has now been deployed. Thanks for raising this issue.