Allow multiline expressions
This commit is contained in:
@ -61,7 +61,10 @@ lnewline :: Lexer LToken
|
||||
lnewline = char '\n' *> pure LNewline
|
||||
|
||||
sc :: Lexer ()
|
||||
sc = space space1 (skipLineComment "--") (skipBlockComment "|-" "-|")
|
||||
sc = space
|
||||
(void $ takeWhile1P (Just "space") (\c -> c == ' ' || c == '\t'))
|
||||
(skipLineComment "--")
|
||||
(skipBlockComment "|-" "-|")
|
||||
|
||||
tricuLexer :: Lexer [LToken]
|
||||
tricuLexer = do
|
||||
@ -75,7 +78,8 @@ tricuLexer = do
|
||||
pure tokens
|
||||
where
|
||||
tricuLexer' =
|
||||
[ try identifier
|
||||
[ try lnewline
|
||||
, try identifier
|
||||
, try keywordT
|
||||
, try integerLiteral
|
||||
, try stringLiteral
|
||||
|
Reference in New Issue
Block a user