mirror of
https://github.com/github/semantic.git
synced 2024-12-19 21:01:35 +03:00
Merge branch 'master' into markdown
This commit is contained in:
commit
a66133e40f
@ -141,8 +141,8 @@ toTermName source term = case unwrap term of
|
|||||||
S.Ternary expr _ -> toTermName' expr
|
S.Ternary expr _ -> toTermName' expr
|
||||||
S.MathAssignment id _ -> toTermName' id
|
S.MathAssignment id _ -> toTermName' id
|
||||||
S.Operator _ -> termNameFromSource term
|
S.Operator _ -> termNameFromSource term
|
||||||
S.Object kvs -> "{" <> intercalate ", " (toTermName' <$> kvs) <> "}"
|
S.Object kvs -> "{ " <> intercalate ", " (toTermName' <$> kvs) <> " }"
|
||||||
S.Pair a b -> toTermName' a <> ": " <> toTermName' b
|
S.Pair a _ -> toTermName' a <> ": …"
|
||||||
S.Return expr -> maybe "empty" toTermName' expr
|
S.Return expr -> maybe "empty" toTermName' expr
|
||||||
S.Error _ _ -> termNameFromSource term
|
S.Error _ _ -> termNameFromSource term
|
||||||
S.If expr _ _ -> termNameFromSource expr
|
S.If expr _ _ -> termNameFromSource expr
|
||||||
@ -165,7 +165,7 @@ toTermName source term = case unwrap term of
|
|||||||
toArgName :: (HasCategory leaf, HasField fields Category, HasField fields Range) => SyntaxTerm leaf fields -> Text
|
toArgName :: (HasCategory leaf, HasField fields Category, HasField fields Range) => SyntaxTerm leaf fields -> Text
|
||||||
toArgName arg = case identifiable arg of
|
toArgName arg = case identifiable arg of
|
||||||
Identifiable arg -> toTermName' arg
|
Identifiable arg -> toTermName' arg
|
||||||
Unidentifiable _ -> "..."
|
Unidentifiable _ -> "…"
|
||||||
|
|
||||||
maybeParentContext :: Maybe (Category, Text) -> Doc
|
maybeParentContext :: Maybe (Category, Text) -> Doc
|
||||||
maybeParentContext = maybe "" (\annotation ->
|
maybeParentContext = maybe "" (\annotation ->
|
||||||
|
Loading…
Reference in New Issue
Block a user