Archived
1
0
Fork 0
Commit graph

41 commits

Author SHA1 Message Date
Brandon Rozek
d486a64052 Made getValue for variable have a const parameter since things don't change 2018-09-28 22:53:41 -04:00
Brandon Rozek
d740cc17af Made toString functions and overloaded the stream operator 2018-09-28 22:49:26 -04:00
Brandon Rozek
8dd2e789c0 struct->classes
Environment now has destructor
2018-09-28 21:54:24 -04:00
Brandon Rozek
7733f5b3c2 Updated token splitter to contain lambda notatoin 2018-09-28 15:28:47 -04:00
Brandon Rozek
7d044f5698 Fixed error with lambda functions not parsing correctly 2018-09-28 15:28:31 -04:00
Brandon Rozek
33bb265d27 Replaced ints with uints and added comments indicating where I'll want delete statements in the future. 2018-09-28 14:11:58 -04:00
Brandon Rozek
9a727aa83b Delete node now is replaced by deconstructor 2018-09-28 13:33:11 -04:00
Brandon Rozek
f0fc180319 fprintf/printf changed to cout/cerr 2018-09-28 12:32:36 -04:00
Brandon Rozek
7514b3a088 Variable constructor made 2018-09-28 12:32:19 -04:00
Brandon Rozek
6022898e2b Replaced make_node with a Node constructor 2018-09-28 12:05:06 -04:00
Brandon Rozek
4c2afd779d Replaced create_environment with constructor 2018-09-28 09:59:04 -04:00
Brandon Rozek
f84b631124 Added constructors/destructors for TypeVal and Value 2018-09-28 09:49:58 -04:00
Brandon Rozek
bd66b4ad11 Fixed spacing and set initial nullptr values 2018-09-27 23:34:06 -04:00
Brandon Rozek
0bc8eaa46c Enabled O3 optimizations 2018-09-27 23:33:48 -04:00
Brandon Rozek
f14d4e4bc2 Replaced my custom linear search with the stl library version 2018-09-27 23:30:58 -04:00
Brandon Rozek
0bd0cf3435 Replaced arrays for environment with vectors that way we can hold "unlimited" variables. 2018-09-27 22:57:00 -04:00
Brandon Rozek
f8f7829cb6 Used a stl array for nodes for better maintanability 2018-09-27 22:37:21 -04:00
Brandon Rozek
53575d25f9 Converted NULL to nullptr
Converted fprintf to cout/cerr
Removed as much C dependencies as possible
2018-09-26 20:03:54 -04:00
Brandon Rozek
492a581d19 Eradicated the char* existent in the variable struct 2018-09-26 19:42:22 -04:00
Brandon Rozek
3cdf1f439c Changed extensions from C style to C++ style 2018-09-26 19:28:55 -04:00
Brandon Rozek
8b5732a398 Switched to C++17 compiler 2018-09-26 19:17:08 -04:00
Brandon Rozek
e8e4baabb6 Took out remaining char* and removed mallocs 2018-09-26 19:16:59 -04:00
Brandon Rozek
65f50a159b Commented out the third node value since it's currently unused in eval_expression 2018-09-26 17:54:44 -04:00
Brandon Rozek
f11a422819 Replaced char* with string in node functionality 2018-09-26 17:51:17 -04:00
Brandon Rozek
24e3003c00 Converted project to C++ 2018-09-26 16:44:22 -04:00
Brandon Rozek
aa7e348552 Casted pointers to correct type and seperated out the LAMBDATAG and LAMBDA constants 2018-09-26 15:56:36 -04:00
Brandon Rozek
28e2352eac Added string support to SLOTH (comparisons, string concatenation, etc)
Refactored print_value code
2018-09-26 15:43:08 -04:00
Brandon Rozek
1186419184 Added a shell when no arguments are given to sloth.
Now has a new dependencies on editline library.
2018-09-26 12:47:43 -04:00
Brandon Rozek
f3e04ac019 Modified gitignore file to match new build process 2018-09-25 22:39:26 -04:00
Brandon Rozek
8c7571bef4 Modularized programming language code. Code is no longer in several large files :) 2018-09-25 22:37:05 -04:00
Brandon Rozek
b0ec7c113c Now you can define a single argument lambda expression and call it using the standard parenthesis notation 2018-09-24 16:43:53 -04:00
Brandon Rozek
82f7e21d3a Added the abilty for lambda expressions to be added into the AST. Have not added logic to properly evaulate lambda expressions yet. Currently defaults to a long with the value 0. 2018-09-24 14:21:32 -04:00
Brandon Rozek
3b6198669f Implemented booleans 2018-09-20 23:03:05 -04:00
Brandon Rozek
7664ee1f80 Replaced int type in Value with an enum. Also wrote abstractions for make_value and cleaned up some operational code 2018-09-20 22:11:33 -04:00
Brandon Rozek
832fdc34f6 Allows parser to recognize true/false in code. No logic has been written yet to handle it. 2018-09-20 21:42:59 -04:00
Brandon Rozek
16575da1dc Added an int type 2018-09-20 21:29:08 -04:00
0ddbe79d25 Modified gitignore file and added the Value Type definition. 2018-09-19 18:44:42 -04:00
1bf170d70c Added gitignore for build files and visual studio code vgcore 2018-09-18 23:23:56 -04:00
b2995e2475 Cosmetics 2018-09-18 23:22:44 -04:00
61301aaa97 Cleaned up error checking code 2018-09-18 23:18:20 -04:00
fbfaf0ddb8 Added beginning code for SLOTH 2018-09-18 22:50:15 -04:00