at long last

more

no more undefineds
This commit is contained in:
crumbtoo
2024-01-28 17:54:39 -07:00
parent fdaa2a1afd
commit 7d42f9b641
4 changed files with 65 additions and 145 deletions

View File

@@ -57,7 +57,7 @@ $asciisym = [\!\#\$\%\&\*\+\.\/\<\=\>\?\@\\\^\|\-\~\:]
|infixr|infixl|infix
@reservedop =
"=" | \\ | "->" | "|"
"=" | \\ | "->" | "|" | "::"
rlp :-
@@ -187,8 +187,8 @@ pushLexState :: Int -> P ()
pushLexState n = psLexState %= (n:)
readInt :: Text -> Int
readInt = T.foldr f 0 where
f c n = digitToInt c + 10*n
readInt = T.foldl f 0 where
f n c = 10*n + digitToInt c
constToken :: RlpToken -> LexerAction (Located RlpToken)
constToken t inp l = do