Commit Graph

252 Commits

Author SHA1 Message Date
Deukhoofd 90ec4766c3
Support unicode as variables
continuous-integration/drone/push Build is passing Details
2019-06-15 17:51:10 +02:00
Deukhoofd 3dc67ec8a0
Move Lexer to u16string handling, for unicode support
continuous-integration/drone/push Build is passing Details
2019-06-15 17:20:27 +02:00
Deukhoofd f73bd2003c
Don't cascade errors if index assignment index is error
continuous-integration/drone/push Build is passing Details
2019-06-15 16:01:34 +02:00
Deukhoofd 5cd05053e1
Support having no getter/setters on a userdata field
continuous-integration/drone/push Build is passing Details
2019-06-15 15:38:52 +02:00
Deukhoofd 7c345d85e8
Work on making userdata work through extern C entry points
continuous-integration/drone/push Build is passing Details
2019-06-14 22:21:33 +02:00
Deukhoofd 2c313791d9
Ensure memory is handled properly with userdata
continuous-integration/drone/push Build is passing Details
2019-06-14 17:35:05 +02:00
Deukhoofd a9def6c539
Implements setting table values
continuous-integration/drone/push Build is failing Details
2019-06-14 17:12:27 +02:00
Deukhoofd 996b5be496
Implements basics for UserData 2019-06-14 14:59:38 +02:00
Deukhoofd eb57a46b0b
Fix tests
continuous-integration/drone/push Build is failing Details
2019-06-13 19:10:22 +02:00
Deukhoofd 3e00f750ef
Make Lexer use constant Tokens
continuous-integration/drone/push Build is failing Details
2019-06-13 18:49:38 +02:00
Deukhoofd 5910cbbfa9
Make parsed statements constant during binding 2019-06-13 18:14:59 +02:00
Deukhoofd 601c4a3f89
Always pass the script string around by reference 2019-06-13 17:37:23 +02:00
Deukhoofd 10a2535c96
Handle bound classes as constants during evaluation
continuous-integration/drone/push Build is passing Details
2019-06-13 17:12:46 +02:00
Deukhoofd 1cb65f17c9
Work on performance improvements
continuous-integration/drone/push Build is passing Details
2019-06-13 16:26:10 +02:00
Deukhoofd e93bcab14d
Changed references of u_int64_t to uint64_t, to account for mingw
continuous-integration/drone/push Build is passing Details
2019-06-13 15:31:48 +02:00
Deukhoofd 9d5c6911b2
Fix memory leak when using variables
continuous-integration/drone/push Build is failing Details
2019-06-13 15:18:20 +02:00
Deukhoofd 813ab1e90b
Rework of variable scope to reduce load on evaluator 2019-06-13 15:16:41 +02:00
Deukhoofd 0339c44a89
Fix memory leak on tables
continuous-integration/drone/push Build is passing Details
2019-06-12 18:47:34 +02:00
Deukhoofd 22149d9243
Fixes for return statement, make Evaluate function on script return value
continuous-integration/drone/push Build was killed Details
2019-06-12 18:45:47 +02:00
Deukhoofd 3477ddd18c
Rework function evaluation scope to handle tables
continuous-integration/drone/push Build is passing Details
2019-06-12 17:56:47 +02:00
Deukhoofd c022c91777
Implements complex tables
continuous-integration/drone/push Build is passing Details
2019-06-12 15:19:28 +02:00
Deukhoofd ba4fe888fa
Pass parsed block statements as reference instead of value 2019-06-11 14:58:43 +02:00
Deukhoofd 081def0be0
Implements basic numerical tables
continuous-integration/drone/push Build is passing Details
2019-06-09 20:15:09 +02:00
Deukhoofd ec2419bc7d
Minor cleanup of Parser 2019-06-09 12:48:14 +02:00
Deukhoofd 9241273e7c
Remove variable branch after function is finished running
continuous-integration/drone/push Build is passing Details
2019-06-09 12:37:19 +02:00
Deukhoofd 471632c6e4
Rework of evaluation variable handling, to account for functions having branching variable states
continuous-integration/drone/push Build is passing Details
2019-06-08 18:33:56 +02:00
Deukhoofd 4d452b33e0
Jump to specific function scope when calling function
continuous-integration/drone/push Build is passing Details
2019-06-08 16:44:47 +02:00
Deukhoofd d385a9e3ee
Fix parametered functions skipping a token 2019-06-08 16:30:23 +02:00
Deukhoofd 7ed53193de
Make functions be able to call themselves
continuous-integration/drone/push Build is failing Details
2019-06-08 16:02:21 +02:00
Deukhoofd 7d75131822
Implemented comparison equality operators 2019-06-08 15:38:08 +02:00
Deukhoofd fc66c15c2f
Fixed issue where function declarations without parameters would cause errors
continuous-integration/drone/push Build is passing Details
2019-06-08 14:42:23 +02:00
Deukhoofd a2263535d9
Fixed issue where function parser keeps consuming tokens and causes out of range exceptions 2019-06-08 14:40:21 +02:00
Deukhoofd ed6fbdbef0
Fix wrong block statements consuming EOF token, causing a nullptr exception 2019-06-08 14:27:24 +02:00
Deukhoofd e233616b8e
Implements if, elseif and else statements
continuous-integration/drone/push Build is passing Details
2019-06-08 14:25:15 +02:00
Deukhoofd f4a3918947
Implements return statement
continuous-integration/drone/push Build is passing Details
2019-06-07 15:23:13 +02:00
Deukhoofd f143e526ab
Added support for calling script functions from extern C hooks
continuous-integration/drone/push Build is passing Details
2019-06-07 13:51:49 +02:00
Deukhoofd a747c60f32
Removed ununused directive 2019-06-07 12:48:13 +02:00
Deukhoofd 81d57f6027
Get rid of insert_or_assign functions on map, as mingw seems to be having trouble with it
continuous-integration/drone/push Build is passing Details
2019-06-07 12:35:43 +02:00
Deukhoofd 4464cece57
Mingw doesn't seem to recognize intert_or_assign, so make it only use that on GCC
continuous-integration/drone/push Build is failing Details
2019-06-06 20:43:36 +02:00
Deukhoofd 7f73bf07d2
Create new string in Lexer when not passed by reference
continuous-integration/drone/push Build is failing Details
2019-06-06 20:07:55 +02:00
Deukhoofd bffa133a3a
Renamed import to include 2019-06-06 19:03:28 +02:00
Deukhoofd ada2690dcd
Rename Diagnostics
continuous-integration/drone/push Build is failing Details
2019-06-06 19:01:54 +02:00
Deukhoofd cb5d9e2f62
Implements indexing, currently can only be used with strings 2019-06-06 17:35:51 +02:00
Deukhoofd b275e1fbd6
Added basics for lexing index expressions 2019-06-05 21:01:59 +02:00
Deukhoofd d49692a17e
Minor optimizations in lexer 2019-06-05 19:11:56 +02:00
Deukhoofd bda26b0ddf
Allow non-local script functions to be called from outside the script 2019-06-05 18:44:23 +02:00
Deukhoofd 43dede9ae2
Work to add C style entry points to library that allow most functionality 2019-06-05 17:46:46 +02:00
Deukhoofd 6206fef4c5
Rework evaluation to use shared pointers, fix bugs 2019-06-01 21:38:39 +02:00
Deukhoofd 4408cf00cd
Large overhaul of pointers to shared_ptrs, implemented function evaluation 2019-06-01 19:20:31 +02:00
Deukhoofd 8b70eed516
Implements parsing of function calling 2019-06-01 14:56:28 +02:00
Deukhoofd 1231a77761
Fixes and changes for function declarations, using shared_ptr instead of raw pointers 2019-06-01 13:43:25 +02:00
Deukhoofd 6936b26cae
Implements binding and evaluating function declarations 2019-06-01 12:33:52 +02:00
Deukhoofd c407ba2f50
Implements parsing function declarations 2019-05-31 15:00:14 +02:00
Deukhoofd 6fad5a0a7d
Implements variable usage, tweaks and fixes for variable assignment 2019-05-30 15:23:48 +02:00
Deukhoofd 257eb942c7
Clean up EvaluationScope class 2019-05-29 15:12:13 +02:00
Deukhoofd bda561b775
Fixes for creating variable in local scope 2019-05-29 15:10:16 +02:00
Deukhoofd 188d89db94
Fixed memory leak in script variables 2019-05-29 15:00:41 +02:00
Deukhoofd f6cf4d96dd
Implements variable assignment evaluation 2019-05-29 14:55:03 +02:00
Deukhoofd 6185f755a4
More fixes for boundscope 2019-05-28 18:50:23 +02:00
Deukhoofd 2c84c1e229
Cleanup and fixes for boundscope 2019-05-28 18:22:07 +02:00
Deukhoofd 5d1c3ac9ba
Implements assignment binding 2019-05-28 17:49:03 +02:00
Deukhoofd dbd7dfdd73
Implements assignment parsing 2019-05-26 14:20:40 +02:00
Deukhoofd 0205b92ae6
Implements string evaluation and concat 2019-05-25 16:15:20 +02:00
Deukhoofd b536187593
Implements unary operation evaluation 2019-05-25 14:59:12 +02:00
Deukhoofd 9131fbfee7
Implements inequality token 2019-05-25 14:17:52 +02:00
Deukhoofd d6a6e116fe
Added equality operation for eval values 2019-05-25 13:57:43 +02:00
Deukhoofd 4a4a71ca73
Added logical and and or binary operations 2019-05-25 13:30:20 +02:00
Deukhoofd ce3be6a039
Improved performance for binary calculations 2019-05-25 12:51:39 +02:00
Deukhoofd f1fbf7044b
Fix issue when deleting script with no evalValue result 2019-05-25 12:26:11 +02:00
Deukhoofd fe2007b095
Fix memory leak on error 2019-05-25 12:01:25 +02:00
Deukhoofd b2fa857c9b
Fix memory leak related to lexer skipping whitespace. 2019-05-24 19:18:03 +02:00
Deukhoofd 4a034bc051
Reworked evaluation to use internal type instead of boost::any 2019-05-24 19:14:30 +02:00
Deukhoofd e5cc27d43e
Fix literal floats evaluating wrong values 2019-05-24 15:33:13 +02:00
Deukhoofd e648013e1d
Implements binary operation for floats 2019-05-24 15:31:11 +02:00
Deukhoofd d949d9aa8f
Work on evaluation 2019-05-23 18:50:09 +02:00
Deukhoofd 57cd3efec9
Parse and bind strings 2019-05-22 13:29:35 +02:00
Deukhoofd 6eb005ab3f
Lex Strings 2019-05-22 13:24:28 +02:00
Deukhoofd 23991ab2ea
Improved performance for lexing identifiers/keywords 2019-05-22 12:41:08 +02:00
Deukhoofd 1cf33d5ae8
Fix build error 2019-05-22 12:37:49 +02:00
Deukhoofd 9cc5c14b43
Small optimization for binary binding 2019-05-22 12:29:29 +02:00
Deukhoofd 2cdb9abdb6
Implements binding unary expressions 2019-05-22 12:22:52 +02:00
Deukhoofd 62e938e039
Implements binding binary expressions 2019-05-21 22:15:51 +02:00
Deukhoofd c8183e5405
Implements binding parenthesized expression 2019-05-21 21:00:56 +02:00
Deukhoofd 80998eab14
More work on binder, implements basic literal expressions 2019-05-21 20:59:52 +02:00
Deukhoofd 2fe6f570ec
Properly clear up memory of parsed results 2019-05-21 18:36:31 +02:00
Deukhoofd 1e5cd010a1
Initial layout for binder 2019-05-21 18:09:08 +02:00
Deukhoofd 2df4a71ed8
Reorganized tests 2019-05-21 17:23:56 +02:00
Deukhoofd aec07bd29a
Adds support for parenthesized expressions 2019-05-21 17:16:53 +02:00
Deukhoofd ae25598864
Expanded on diagnostics, make whitespace completely ignored 2019-05-21 15:11:00 +02:00
Deukhoofd 8f2f122215
Make Diagnostics usage a pointer 2019-05-21 14:15:39 +02:00
Deukhoofd 99f50b6471
Add support for diagnostics to parser 2019-05-21 14:06:35 +02:00
Deukhoofd 2b35da3a7b
Add support for diagnostics 2019-05-21 13:56:08 +02:00
Deukhoofd ad3e61128c
Creates base of script class 2019-05-21 12:59:15 +02:00
Deukhoofd 37e770f1cb
Implements expression parsing 2019-05-20 17:45:03 +02:00
Deukhoofd 7edd51d5e3
Save position and length of tokens 2019-05-19 16:11:16 +02:00
Deukhoofd 608a579f19
Adds \v and \f as whitespace characters 2019-05-19 15:28:45 +02:00
Deukhoofd 96943bad7e
Remove gitmodule for Catch2, replaced it with header file 2019-05-19 14:42:45 +02:00
Deukhoofd 01e8075958
Fix tests being broken 2019-05-19 14:32:10 +02:00
Deukhoofd 06fe0e7c4c
Added lexing support for identifiers and keywords 2019-05-19 14:26:21 +02:00
Deukhoofd 8285811fb7
Add a couple more characters to lex 2019-05-19 12:49:26 +02:00
Deukhoofd 600315d401
Dont consume the character immediately following a number 2019-05-19 12:20:08 +02:00
Deukhoofd 22e450e7e7
Initial commit, adds very basic Lexing 2019-05-18 20:35:51 +02:00