elucidate relationship between statement terminating EOL and advancing to keyword

This commit is contained in:
Yehowshua Immanuel 2024-12-08 23:00:00 -05:00
parent 8a197b25a1
commit db6034db40
4 changed files with 104 additions and 49 deletions

View file

@ -5,6 +5,7 @@ module RTLILParser.Primitives(
,pEol
,pOctal
,pEscapedChar
,pEolAndAdvanceToNextNonWs
) where
import Control.Monad (void)
@ -43,3 +44,6 @@ pNonWs = noneOf " \t\r\n"
pEol :: Parser String
pEol = many1 (oneOf "\r\n")
pEolAndAdvanceToNextNonWs :: Parser ()
pEolAndAdvanceToNextNonWs = void $ pEol *> pMaybeWs