diff options
Diffstat (limited to 'bootstrap/src')
-rw-r--r-- | bootstrap/src/BuildModel.hs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bootstrap/src/BuildModel.hs b/bootstrap/src/BuildModel.hs index 8f4d813..6dc8ddf 100644 --- a/bootstrap/src/BuildModel.hs +++ b/bootstrap/src/BuildModel.hs @@ -308,14 +308,24 @@ useStatement = do moduleSubprogramDeclaration :: ReadP LineContents moduleSubprogramDeclaration = do - skipAnything + skipSpaces + skipProcedureQualifiers _ <- string "module" skipAtLeastOneWhiteSpace - skipAnything _ <- string "function" <|> string "subroutine" skipAtLeastOneWhiteSpace return $ ModuleSubprogramDeclaration +skipProcedureQualifiers :: ReadP () +skipProcedureQualifiers = do + many skipPossibleQualifier + return () + +skipPossibleQualifier :: ReadP () +skipPossibleQualifier = do + _ <- string "pure" <|> string "elemental" <|> string "impure" + skipAtLeastOneWhiteSpace + skipAtLeastOneWhiteSpace :: ReadP () skipAtLeastOneWhiteSpace = do _ <- many1 whiteSpace |