For languages with keywords, some special trickery needs to happen to prevent for example \"if\" from being interpreted as an identifier and \"ifSomeVariableName\" from beco
You can define a parser for whitespace and check if keyword or identifier is followed by it. For example some generic whitespace parser will look like
let pWhiteSpace = pLineComment <|> pMultilineComment <|> pSpaces
this will require at least one whitespace
let ws1 = skipMany1 pWhiteSpace
then if will look like
let pIf = pstring "if" .>> ws1