Somewhat working lambdas

Architectural changes to lambda evaluation and parsing to allow
for correct expression evaluation. Contains several failing AI-generated
tests and we're still failing tests for erroring incomplete definitions
This commit is contained in:
2024-12-27 12:27:00 -06:00
committed by James Eversole
parent 5e574d2ca1
commit c3c6646cb2
5 changed files with 420 additions and 336 deletions

View File

@ -7,6 +7,7 @@ import Data.Void
import qualified Data.Set as Set
type Lexer = Parsec Void String
data LToken
= LKeywordT
| LIdentifier String
@ -44,7 +45,7 @@ stringLiteral = do
if null content
then fail "Empty string literals are not allowed"
else do
char '"' -- "
char '"'
return (LStringLiteral content)
assign :: Lexer LToken
@ -92,5 +93,5 @@ saplingLexer = many (sc *> choice
lexSapling :: String -> [LToken]
lexSapling input = case runParser saplingLexer "" input of
Left err -> error $ "Lexical error:\n" ++ errorBundlePretty err
Left err -> error $ "Lexical error:\n" ++ errorBundlePretty err
Right tokens -> tokens