Fix #93: true/false being mis-parsed when part of an attribute name.

This commit is contained in:
Kosyrev Serge 2018-03-06 04:07:35 +03:00
parent 89305fedf0
commit 0693768550
No known key found for this signature in database
GPG key ID: 3F62F118E38BED6D
2 changed files with 7 additions and 0 deletions

View file

@ -93,6 +93,8 @@ reservedNames = HashSet.fromList
, "rec"
, "inherit"
, "or"
, "true"
, "false"
]
stopWords :: (TokenParsing m, Monad m) => m ()

View file

@ -25,6 +25,11 @@ case_constant_bool = do
assertParseString "true" $ mkBool True
assertParseString "false" $ mkBool False
case_constant_bool_respects_attributes :: Assertion
case_constant_bool_respects_attributes = do
assertParseString "true-foo" $ mkSym "true-foo"
assertParseString "false-bar" $ mkSym "false-bar"
case_constant_path :: Assertion
case_constant_path = do
assertParseString "./." $ mkPath False "./."