Ian Piumarta
148ee3f43e
add getFloat()
il y a 2 ans
mtardy
f6388c1474
Fix indentation issues
il y a 4 ans
mtardy
6e9df129dd
Add floats ( #22 )
* Add floating point numbers
* Add test-float.txt
* Remove unused ast from applyOperator parameters
* Add -lm to libs for non-Darwin fmodl
* Allow negative integer constants in the syntax
* Remove double case on Function in clone
Co-authored-by: Ian Piumarta <piumarta@nas.local>
Co-authored-by: Ian Piumarta <piumarta@gmail.com>
il y a 4 ans
mtardy
cbc3e6ec89
Add factories ( #21 )
* Add Map factory and Integer draft
* Fix Integer factory
* Add map_isArray()
* Fix String factory
* Add Symbol factory
* Fix Map factory
* Add Array factory
* Add Function and Syntax factories
* Fix _checkType
* Add runtimeError for bad arguments in factory functions
* Change makeMapCapacity with malloc instead of realloc
il y a 4 ans
Ian Piumarta
f070bc84c4
add allKeys, allValues; add @@ syntax to unquote and splice an array into a list of arguments or parameters
il y a 4 ans
mtardy
9541a96279
Correctly add slice '[n:m]' for strings and array-like maps
il y a 4 ans
Ian Piumarta
5e7538a2f7
Use safe comparisons in oopcmp
il y a 4 ans
Ian Piumarta
0156ca00f7
Allocate true object sizes instead of sizeof(union object)
il y a 4 ans
mtardy
530e71426b
Move TYPESIG and CASE macros and undef them
il y a 4 ans
mtardy
d4af735207
Add TYPESIG and CASE macros to switch between types combinations more elegantly
il y a 4 ans
Ian Piumarta
1cee17ea17
Add flags to Map with MAP_ENCLOSED bit; add pool pointer to Map for scope free list
il y a 4 ans
Ian Piumarta
ce8ac5975f
Grow maps exponentially instead of linearly
il y a 4 ans
Ian Piumarta
6a297558bc
Add String() factory; instrument memory usage
il y a 4 ans
mtardy
f42be7d411
Fix relations to compare more than just integers, fix semicolons to end
an expression, add for in structure, refactor apply (merge with invoke),
transform millis to microseconds, mix boxed/unboxed integers
il y a 4 ans
mtardy
1ed52120bb
Add slice '[n:m]' for strings and array-like maps
il y a 4 ans
mtardy
2c057a58f9
Fix circular printing, comparison and pass scope to primitives
il y a 4 ans
mtardy
7ca8267244
Add printOn function and fix readEvalPrint with imports
il y a 4 ans
mtardy
1a82135eab
Fix try catch mechanism and runtimeError with mrAST
il y a 4 ans
mtardy
b51fe9f606
Add nice format for runtime errors ( #12 )
* Enhance runtime errors with file and line
* update test files
il y a 4 ans
mtardy
7eb1f4934c
Add '*' operator for string multiplication
il y a 4 ans
mtardy
4e94a2d382
Fix string_concat
il y a 4 ans
mtardy
fed14057ae
Add '+' operator for string concatenation
il y a 4 ans
mtardy
78e17dbf35
Add syntax to extend the language via macro
il y a 4 ans
mtardy
07f07570db
Add quasiquote and unquote mechanism, add 'syntax' fixed functions and use oop as functions name
il y a 4 ans
mtardy
fafec91e1e
Add name to Function struct to print them nicely
il y a 4 ans
mtardy
3ee4fed8f3
Fix isHidden and add map_allkeys
il y a 4 ans
mtardy
17a457e18f
Fix map_print for empty map
il y a 4 ans
mtardy
192ad4de7b
Add map_keys and map_values methods that skip hidden symbols inside maps
il y a 4 ans
mtardy
2128d6abf9
Print error in case of non-integer in arithmetic operation
il y a 4 ans
mtardy
8e2badb3e9
Add return, break, continue statements with setjmp
il y a 4 ans
mtardy
dc31fd1dc4
Convert tabs to spaces and fix indentation issues
il y a 4 ans
mtardy
6d20596796
Add for loop and switch statement
il y a 4 ans
mtardy
614bb8225b
Add return
il y a 4 ans
mtardy
25afb2c964
Bug fix integer tag optimization
il y a 4 ans
mtardy
e4435044d3
Optimizing integers
il y a 4 ans
mtardy
79144dfebb
Move statement rule and fix identation
il y a 4 ans
mtardy
ecdde3c52e
Convert tabs to spaces and fix indentation issues
il y a 4 ans
mtardy
72c66c9995
Add unary, binary, ternary operator, while and semicolons as statement separator
il y a 4 ans
mtardy
75c1e685cf
Add closure and optimize map_search for arrays
il y a 4 ans
mtardy
f8078c49d5
Add draft of map_get for array-like access optimization
il y a 4 ans
mtardy
34b33bf34b
Add function parameters support with simplistic local scope
il y a 4 ans
mtardy
85854f22cf
Add simplistic function definition
il y a 4 ans
mtardy
10fb7089b4
Add read node
il y a 4 ans
mtardy
d92527ec1b
Build and eval the AST for most binary operators
il y a 4 ans
mtardy
b0f59db5cf
Add Objects with prototypes
il y a 4 ans
mtardy
8957b242ad
Fix symbol table
il y a 4 ans
mtardy
73fc6a9e08
Remove Symbol's value and defined and store them in Map KV
il y a 4 ans
mtardy
e7ce81282f
Add assert check on key in map_get
il y a 4 ans
mtardy
38128272b7
map_insert and map_set return value inserted instead of whole map
il y a 4 ans
mtardy
24949bad35
Add a scope parameter in intern function
il y a 4 ans