1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Merge branch 'master' into copointed

This commit is contained in:
Rob Rix 2016-03-03 10:22:24 -05:00
commit 6be5555649
3 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,8 @@ data Category =
| IntegerLiteral
-- | A symbol literal.
| SymbolLiteral
-- | An array literal.
| ArrayLiteral
-- | A non-standard category, which can be used for comparability.
| Other String
deriving (Eq, Show, Ord)

View File

@ -43,6 +43,7 @@ styleName category = "category-" ++ case category of
StringLiteral -> "string"
SymbolLiteral -> "symbol"
IntegerLiteral -> "integer"
ArrayLiteral -> "array"
Other string -> string
-- | Pick the class name for a split patch.

View File

@ -40,6 +40,7 @@ defaultCategoryForNodeName name = case name of
"string" -> Set.singleton StringLiteral
"integer" -> Set.singleton IntegerLiteral
"symbol" -> Set.singleton SymbolLiteral
"array" -> Set.singleton ArrayLiteral
_ -> Set.singleton (Other name)
-- | Given a constructor and a tree sitter document, return a parser.