wip: new folder structure, overhaul language

This commit is contained in:
2025-12-26 02:39:15 -05:00
parent 11e7f70625
commit d427703afe
10 changed files with 132 additions and 111 deletions

View File

@@ -8,8 +8,7 @@ import (
"git.maximhutz.com/max/lambda/internal/cli"
"git.maximhutz.com/max/lambda/internal/config"
"git.maximhutz.com/max/lambda/pkg/lambda"
"git.maximhutz.com/max/lambda/pkg/parser"
"git.maximhutz.com/max/lambda/pkg/tokenizer"
"git.maximhutz.com/max/lambda/pkg/saccharine"
)
// Run main application.
@@ -25,12 +24,12 @@ func main() {
cli.HandleError(err)
// Parse tokens.
tokens, err := tokenizer.GetTokens([]rune(input))
tokens, err := saccharine.GetTokens([]rune(input))
cli.HandleError(err)
logger.Info("Parsed tokens.", "tokens", tokens)
// Turn tokens into syntax tree.
expression, err := parser.GetTree(tokens)
expression, err := saccharine.GetTree(tokens)
cli.HandleError(err)
logger.Info("Parsed syntax tree.", "tree", lambda.Stringify(expression))