1
1
mirror of https://github.com/github/semantic.git synced 2025-01-08 08:30:27 +03:00

Catch string identifiers and skip squoting

This commit is contained in:
Timothy Clem 2016-09-30 14:09:30 -07:00
parent 1c2eb9c687
commit 4f1a609bda

View File

@ -111,6 +111,7 @@ toLeafInfos :: DiffInfo -> [Doc]
toLeafInfos (LeafInfo "number" termName) = pure (squotes (toDoc termName))
toLeafInfos (LeafInfo "boolean" termName) = pure (squotes (toDoc termName))
toLeafInfos (LeafInfo "anonymous function" termName) = pure (toDoc termName)
toLeafInfos (LeafInfo cName@"string" termName) = pure (toDoc termName <+> toDoc cName)
toLeafInfos LeafInfo{..} = pure (squotes (toDoc termName) <+> toDoc categoryName)
toLeafInfos BranchInfo{..} = toLeafInfos =<< branches
toLeafInfos err@ErrorInfo{} = pure (pretty err)