1
1
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:
Rob Rix 2017-04-07 21:26:02 -04:00
parent 755b448ac5
commit 72ad4e027e

View File

@ -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