mirror of
https://github.com/github/semantic.git
synced 2024-11-28 01:47:01 +03:00
Generalize the ast helper over the grammar type.
This commit is contained in:
parent
755b448ac5
commit
72ad4e027e
@ -44,7 +44,7 @@ spec = do
|
||||
it "does not match if its subrule does not match" $
|
||||
runAssignment (children red) [ast Blue "b" [ast Green "a" []]] `shouldBe` Nothing
|
||||
|
||||
ast :: Grammar -> ByteString -> [AST Grammar] -> AST Grammar
|
||||
ast :: grammar -> ByteString -> [AST grammar] -> AST grammar
|
||||
ast g s c = Rose (Node g s) c
|
||||
|
||||
data Grammar = Red | Green | Blue
|
||||
|
Loading…
Reference in New Issue
Block a user