1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 21:16:12 +03:00

Output error text from source

This commit is contained in:
joshvera 2016-08-08 15:23:08 -04:00
parent 54fac40f80
commit 7d4e6affc2

View File

@ -63,7 +63,7 @@ toTermName source term = case unwrap term of
S.Object kvs -> "{" <> intercalate ", " (toTermName' <$> kvs) <> "}" S.Object kvs -> "{" <> intercalate ", " (toTermName' <$> kvs) <> "}"
S.Pair a b -> toTermName' a <> ": " <> toTermName' b S.Pair a b -> toTermName' a <> ": " <> toTermName' b
S.Return expr -> maybe "empty" toTermName' expr S.Return expr -> maybe "empty" toTermName' expr
S.Error span _ -> displayStartEndPos span S.Error _ _ -> termNameFromSource term
S.For _ _ -> termNameFromChildren term S.For _ _ -> termNameFromChildren term
S.While expr _ -> toTermName' expr S.While expr _ -> toTermName' expr
S.DoWhile _ expr -> toTermName' expr S.DoWhile _ expr -> toTermName' expr