mirror of
https://github.com/github/semantic.git
synced 2024-12-19 12:51:52 +03:00
Disambiguate between Syntax Comment and Category Comment
This commit is contained in:
parent
60d10c483e
commit
e9240b5b6e
@ -108,7 +108,7 @@ toTermName source term = case unwrap term of
|
||||
S.Array _ -> termNameFromSource term
|
||||
S.Class identifier _ _ -> toTermName' identifier
|
||||
S.Method identifier _ _ -> toTermName' identifier
|
||||
Comment a -> toCategoryName a
|
||||
S.Comment a -> toCategoryName a
|
||||
S.Commented _ _ -> termNameFromChildren term
|
||||
where toTermName' = toTermName source
|
||||
termNameFromChildren term = termNameFromRange (unionRangesFrom (range term) (range <$> toList (unwrap term)))
|
||||
@ -174,6 +174,7 @@ instance HasCategory Category where
|
||||
BinaryOperator -> "binary operator"
|
||||
Boolean -> "boolean"
|
||||
DictionaryLiteral -> "dictionary"
|
||||
C.Comment -> "comment"
|
||||
C.Error -> "error"
|
||||
ExpressionStatements -> "expression statements"
|
||||
C.Assignment -> "assignment"
|
||||
|
Loading…
Reference in New Issue
Block a user