Commit Graph

1780 Commits

Author SHA1 Message Date
greg
7ab385d398 Bring custom ADTs to the repl 2018-07-26 00:52:46 -07:00
greg
9fb148bb02 Make compile again 2018-07-26 00:52:46 -07:00
greg
97df2fa344 I dunno 2018-07-26 00:52:46 -07:00
greg
a08134a747 Delete old code in eval 2018-07-26 00:52:46 -07:00
greg
6707b2bb9c debug outputs in order 2018-07-26 00:52:46 -07:00
greg
3ac50f974d Pass around reference to type context in evaluator 2018-07-26 00:52:46 -07:00
greg
160ce95e5f Fully comment example source file 2018-07-26 00:52:46 -07:00
greg
afc4281e7f Evaluate function arguments in context before applying them 2018-07-26 00:52:46 -07:00
greg
8d6fea942f Handle function definition before use
And some other ReducedAST - Evaluation niceties
2018-07-26 00:52:46 -07:00
greg
6d93c758a2 Add function to symbol table 2018-07-26 00:52:46 -07:00
greg
aff421cd99 Working with symbol table
Note that symbol table is a different object now than the previous
binding table that was used for type-checking. That binding table is not
currently debugged and should be debugged in a separate debug output with
typechecking proper.
2018-07-26 00:52:46 -07:00
greg
493d76da0b Add symbol table data structure to typechecking 2018-07-26 00:52:46 -07:00
greg
eb681fbff9 Make parse error message nicer 2018-07-26 00:52:46 -07:00
greg
f3e3843528 Decomplexify delimited! 2018-07-26 00:52:46 -07:00
greg
6b90e19eb1 Simplify expect! macro
Ends up printing a debug print, but whatever, will fix later
2018-07-26 00:52:46 -07:00
greg
210ae47c8b Get rid of lambda 2018-07-26 00:52:46 -07:00
greg
70794d8ff1 For expression parsing 2018-07-26 00:52:46 -07:00
greg
532c8c45b4 Parse while expressions
Decided to add while expressions to the language to make for-parsing
easier. Plus some other random notes
2018-07-26 00:52:46 -07:00
greg
24b532df06 This doesn't need to be a closure 2018-07-26 00:52:46 -07:00
greg
ac576be604 Trim newline in getline()
Ineffiicent but whatever
2018-07-26 00:52:46 -07:00
greg
6bf106a1a3 Equality 2018-07-26 00:52:46 -07:00
greg
161e47fe91 Add schala source file test.schala 2018-07-26 00:52:46 -07:00
greg
1a58f3b7af Add fizzbuzz source
Next goal will be, to implement enough to make this work
2018-07-26 00:52:46 -07:00
greg
44e585fca2 Conditionals 2018-07-26 00:52:46 -07:00
greg
3f836eb74f Kill some warnings 2018-07-26 00:52:46 -07:00
greg
abf25d648d Change repl behavior of strings 2018-07-26 00:52:46 -07:00
greg
1f6e6d9b31 Tuples 2018-07-26 00:52:46 -07:00
greg
e2703121d8 Kill unneeded import 2018-07-26 00:52:46 -07:00
greg
e5b6b41422 Error msg 2018-07-26 00:52:46 -07:00
greg
6c5e3dea5d Assignment 2018-07-26 00:52:46 -07:00
greg
bd8bf1945c Super simple janky input 2018-07-26 00:52:46 -07:00
greg
9e393d2753 Kill old type structure 2018-07-26 00:52:46 -07:00
greg
822420a9d5 Add an eval test 2018-07-26 00:52:46 -07:00
greg
6f8dc9bedd rename IntLiteral -> NatLiteral 2018-07-26 00:52:46 -07:00
greg
3b134d7fb6 very simple code 2018-07-26 00:52:46 -07:00
greg
e0cec8b8a6 print, println as builtins 2018-07-26 00:52:46 -07:00
greg
1a84f62818 Kill some old code, make very_simple example print 2018-07-26 00:52:46 -07:00
greg
b1966d7199 Function calling works kind of 2018-07-26 00:52:46 -07:00
greg
fdbb21990d Retrieve function from memory when called 2018-07-26 00:52:46 -07:00
greg
1011ff08f3 Use new rust 1.26 less verbose syntax 2018-07-26 00:52:46 -07:00
greg
6d8d2aecbd Functions 2018-07-26 00:52:46 -07:00
greg
848306ad1a Reduce defined function 2018-07-26 00:52:46 -07:00
greg
e6f0710e41 Debug ast rewrite 2018-07-26 00:52:46 -07:00
greg
d7e3f695b7 Very simple source file 2018-07-26 00:52:46 -07:00
greg
78ba4e1ed3 Variable lookup 2018-07-26 00:52:46 -07:00
greg
481afb0f87 Fix debugging and debug eval 2018-07-26 00:52:46 -07:00
greg
01986e7474 starting bindings 2018-07-26 00:52:46 -07:00
greg
9cf5260d4b Use impl Trait to simplify type signatures 2018-07-26 00:52:46 -07:00
greg
b50d87b85b Idea 2018-07-26 00:52:46 -07:00
greg
18c8176134 Get rid of unneeded imports 2018-07-26 00:52:46 -07:00