Commit Graph

12 Commits

Author SHA1 Message Date
17c15e5bad Various changes
Arrays, loops, ternary, and other major features. Check doc
2025-08-06 21:42:09 -04:00
7c57a9a111 Implement functions, closures, standard library, and comprehensive number system
- Add function declarations, calls, and return statements
- Implement lexical scoping with Environment class and closures
- Convert print from statement to standard library function
- Add assert() function to standard library for testing
- Add time() function for microsecond precision benchmarking
- Create StdLib class and BuiltinFunction wrapper for standard library
- Implement first-class functions and higher-order functions
- Add function parameter support (tested up to 100 parameters)
- Support alphanumeric identifiers in variable and function names
- Add underscore support in variable names and identifiers
- Implement string + number and number + string concatenation
- Add boolean + string and string + boolean concatenation
- Support string multiplication (string * number)
- Fix decimal truncation issue by using std::stod for all number parsing
- Add comprehensive number formatting with proper precision handling
- Support huge numbers (epoch timestamps) without integer overflow
- Clean number display (no trailing zeros on integers)
- Add basic error handling with program termination on errors
- Add comprehensive test suite covering all features
- Add escape sequence support (\n, \t, \", \\)
- Add comprehensive documentation and language reference
- Update development roadmap with completed features
2025-07-30 17:51:48 -04:00
Bobby Lucero
942c1e323b Tidy code, interactive interpreter prints out result of expression without explicit print statement 2023-06-01 17:19:19 -04:00
Bobby Lucero
fe26a7c2e0 Added scopes 2023-05-31 02:44:39 -04:00
b38f6bff25 Fixed header duplicate symbols 2023-05-27 21:18:53 -04:00
9500cf9773 Removed templating as it turns out, wasn't needed. Added shorthands to make the code less ugly 2023-05-27 13:11:08 -04:00
a0ec4af169 ASTPrinter now prints generated AST from parser 2023-05-27 02:05:06 -04:00
f8853d022b More makefile changes 2023-05-26 21:14:13 -04:00
00cbc056c8 Code cleaning, fixed makefile project errors for CLion 2023-05-26 21:05:03 -04:00
7b59f1f596 Minor Changes 2023-05-24 00:57:49 -04:00
d909e546f2 Rough implementation of ASTPrinter complete with nasty shared_ptr syntax :) 2023-05-24 00:29:12 -04:00
c5f981321c AST Struct Generator 2023-05-21 20:40:43 -04:00