Add "extend symbol" lexer to parse extensions

This commit is contained in:
2020-01-17 12:22:29 +01:00
parent ba710a3c96
commit 3ef27f9d11
5 changed files with 14 additions and 2 deletions

View File

@ -87,6 +87,8 @@ spec = describe "Lexer" $ do
parse blockString "" [r|""""""|] `shouldParse` ""
it "lexes ampersand" $
parse amp "" "&" `shouldParse` "&"
it "lexes schema extensions" $
parse (extend "schema") "" `shouldSucceedOn` "extend schema"
runBetween :: (Parser () -> Parser ()) -> Text -> Either (ParseErrorBundle Text Void) ()
runBetween parser = parse (parser $ pure ()) ""