1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 18:23:44 +03:00

Add a predicate for closed rows.

This commit is contained in:
Rob Rix 2015-12-18 13:17:03 -05:00
parent 8f2473fd48
commit 8bb258a8e6

View File

@ -178,3 +178,4 @@ spec = do
offsetAnnotated by1 by2 (Annotated (left, right) syntax) = Annotated (offsetInfo by1 left, offsetInfo by2 right) syntax
span = Span (Just "category-leaf")
isOpen (Row a b) = (maybe False (const True) $ openLine [ a ]) && (maybe False (const True) $ openLine [ b ])
isClosed (Row a b) = (maybe True (const False) $ openLine [ a ]) && (maybe True (const False) $ openLine [ b ])