mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
Curry defaultTermAssignment.
This commit is contained in:
parent
a6c897163c
commit
44ecf732fa
@ -76,8 +76,8 @@ assignTerm = \case
|
||||
Ruby -> Ruby.termAssignment
|
||||
_ -> Language.termAssignment
|
||||
|
||||
defaultTermAssignment :: Source Char -> (Category, [ SyntaxTerm Text '[Range, Category, SourceSpan] ]) -> S.Syntax Text (SyntaxTerm Text '[Range, Category, SourceSpan])
|
||||
defaultTermAssignment source = \case
|
||||
defaultTermAssignment :: Source Char -> Category -> [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -> S.Syntax Text (SyntaxTerm Text '[Range, Category, SourceSpan])
|
||||
defaultTermAssignment source = curry $ \case
|
||||
(Comment, _) -> S.Comment (toText source)
|
||||
(_, []) -> S.Leaf (toText source)
|
||||
(_, children) -> S.Indexed children
|
||||
|
Loading…
Reference in New Issue
Block a user