Commit Graph

128 Commits

Author SHA1 Message Date
ValKmjolnir aaccfbda11 🐛 fix ast print bug & delete some macros 2022-10-30 18:40:03 +08:00
ValKmjolnir feea901e4d 🎨 improve code format
delete option -v, --version, -l, --lex
2022-10-30 01:26:26 +08:00
ValKmjolnir d121dcd630 🎨 improve format of code 2022-10-28 23:28:15 +08:00
ValKmjolnir 3fd1b25f79 🔥 change class name.
nasal_lexer -> lexer
nasal_parse -> parse
nasal_codegen -> codegen
nasal_vm -> vm
nasal_gc -> gc
nasal_dbg -> debugger
nasal_import -> linker
nas_ref -> var
2022-10-21 01:29:29 +08:00
ValKmjolnir 025ff49ffc 🚀 add `stl/csv.nas` & ast name change 2022-10-19 00:54:21 +08:00
ValKmjolnir e25eb76e94 🚀 delete unnecessary codes & add `stl/string.nas` 2022-10-05 16:03:47 +08:00
ValKmjolnir cff9f91bee 🚀 move `pic` directory into `doc` 2022-09-19 00:10:08 +08:00
ValKmjolnir aa5b1d3d66 🚀 import information output of dbg, vm and codegen 2022-09-11 17:22:00 +08:00
ValKmjolnir 972ad49a4f improve error output info generated by codegen. 2022-09-05 00:41:36 +08:00
ValKmjolnir a13e419518 📝 fix MSVC warning in nasal_builtin.h & improve error output. 2022-09-04 23:08:06 +08:00
ValKmjolnir 5715c1df5f 🎨 improve error log output format. 2022-09-02 02:04:03 +08:00
ValKmjolnir a91826607c optimize header file, now modules could generate smaller dynamic libs. 2022-08-24 22:08:47 +08:00
ValKmjolnir 44bfd74ca9 📝 optimize codes 2022-08-01 22:51:19 +08:00
ValKmjolnir 04a45064c8 📝 delete unnecessary code & change test file. 2022-07-31 19:26:13 +08:00
ValKmjolnir 068743aa4c 📝 change `int` in code to `i32`, optimize code. 2022-07-31 02:19:29 +08:00
ValKmjolnir 006ed644e6 🚀 move fg constants to `stl/fg_env.nas`, add `io.exists`. now dlopen and import can search file in PATH. 2022-07-28 21:44:55 +08:00
ValKmjolnir db896e932f correct types in nasal_codegen.h 2022-07-27 00:59:35 +08:00
ValKmjolnir 99a131c552 🚀 change `std::string` to `string`, change identifiers' name, `-o` is now a function available in debug mode. 2022-07-23 17:00:25 +08:00
ValKmjolnir 46516485b5 📝 change name of used types 2022-07-23 12:35:21 +08:00
ValKmjolnir cfbec9a3f1 📝 change identifiers' name 2022-07-18 23:54:44 +08:00
ValKmjolnir bcdc55a652 optimize code & replace all `printf` with `std::cout`. 2022-07-09 23:36:14 +08:00
ValKmjolnir 9890b46f02 optimize code. 2022-07-08 23:00:36 +08:00
ValKmjolnir 11e9567b55 📝 change some identifiers' name. 2022-07-08 18:16:00 +08:00
ValKmjolnir 5d4cff0aa8 🚀 shrink code size & now import module can search lib file from local dir and dirs in PATH 2022-07-08 00:42:56 +08:00
ValKmjolnir ebfacd9197 optimize codes 2022-05-22 18:19:13 +08:00
ValKmjolnir 99dca532f6 📝 add notes in nasal_codegen.h and nasal_vm.h. add register_info() in debugger. 2022-05-21 14:22:54 +08:00
ValKmjolnir c5171c735a 💬 change code related to macros 'PRTHEX' 2022-05-08 19:43:27 +08:00
ValKmjolnir 51a1279110 add utf-8 identifier check in nasal_lexer & fix printf format at windows platform & add test file utf8chk.nas 2022-05-07 16:50:13 +08:00
ValKmjolnir fd8a148d0c bytecode info print and debugger will show the front 16 characters of strings whose length is greater than 16 2022-05-02 16:56:03 +08:00
ValKmjolnir 7417d5e635 change makefile 2022-04-26 22:53:35 +08:00
ValKmjolnir 785572634b change visual settings in -c/-dbg 2022-04-23 01:51:49 +08:00
ValKmjolnir 4f5fd3de33 op_addeq~op_lnkeq and op_addeqc~op_lnkeqc and op_meq operands now can do pop, this will decrease the frequency of calling op_pop 2022-04-17 17:20:18 +08:00
ValKmjolnir fc25dd69e1 fix bug in codegen: foreach/forindex(id;vec/hash) may cause segmentation fault because of incorrect generated operand 2022-04-16 19:45:55 +08:00
ValKmjolnir 022460755f optimize codes 2022-04-12 18:26:54 +08:00
ValKmjolnir 4503239731 change STACK_MAX_DEPTH to nasal_gc::stack_depth 2022-04-09 23:14:28 +08:00
ValKmjolnir 617ad03d33 add math.pow 2022-03-27 16:14:55 +08:00
ValKmjolnir b66ebbef4b fix bytecode output format bug 2022-03-27 13:10:35 +08:00
ValKmjolnir 86f6296268 change opcode print format 2022-03-27 01:20:17 +08:00
ValKmjolnir 27e25f84ec update main.cpp and bug fix 2022-03-20 18:28:45 +08:00
ValKmjolnir 9bcad59e45 change enum obj_type to nasal_obj::obj_type 2022-03-15 22:51:14 +08:00
ValKmjolnir a4738e8c7d delete operand `op_nop` 2022-02-16 23:27:22 +08:00
ValKmjolnir 980350d70a prepare for function-call optimization 2022-02-12 18:03:50 +08:00
ValKmjolnir 2a85e92d4a optimize test file & little update. 2022-02-06 19:55:45 +08:00
ValKmjolnir d6d90ab7c8 change 'global' & 'local' in codegen to std::unordered_map & std::vector<std::unordered_map>> 2022-02-02 23:52:00 +08:00
ValKmjolnir eaa54035ff change name of enum:ast_hashmember->ast_pair, ast_new_iter->ast_iter
change ast_hashmember to ast_pair is because this type in fact is the same as std::pair<std::string,nasal_ref> in C++
2022-01-31 17:22:44 +08:00
ValKmjolnir c68b4c5947 add new option -op & --optimize to use optimizer | delete bytecode op_pone & op_pzero 2022-01-22 13:37:49 +08:00
ValKmjolnir 630c99c39a optimize codes 2022-01-16 22:48:00 +08:00
ValKmjolnir 1923fc74e4 update README.md 2021-12-23 21:46:53 +08:00
ValKmjolnir f0ae63bce5 lexer,parser,import,codegen use the same error module. 2021-12-23 21:15:50 +08:00
ValKmjolnir 30650bb64f update error info (except parser)
prepare for nasal_err module
2021-12-23 14:09:54 +08:00