ValKmjolnir
b5f839bebe
📝 change some identifiers' name.
2022-07-03 22:46:28 +08:00
ValKmjolnir
8cc483b82a
⚡ optimize codes
2022-07-02 18:08:41 +08:00
ValKmjolnir
beba975ff0
✨ change format of error info
...
parser now can report exact place where is lacking ';' or ','
2022-06-30 23:15:10 +08:00
ValKmjolnir
11d493c9e0
🐛 fix bug of forindex/foreach, which will cause SIGSEGV.
...
example:
var a=func{};
forindex(a();[0,1,2]);
2022-06-11 13:55:10 +08:00
ValKmjolnir
92989ed9f6
optimize codes
2022-04-12 18:26:54 +08:00
ValKmjolnir
88ef0f8dd6
add constant string calculation in optimizer
2022-02-01 21:20:36 +08:00
ValKmjolnir
de0a6d9388
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
a51b7fe11a
optimize codes
2022-01-16 22:48:00 +08:00
ValKmjolnir
37b0d7f12a
bug fixed
2021-12-25 15:56:08 +08:00
ValKmjolnir
1ae354c0cf
lexer,parser,import,codegen use the same error module.
2021-12-23 21:15:50 +08:00
ValKmjolnir
bc9039dd37
change code structure
2021-11-02 22:44:42 +08:00
ValKmjolnir
b131a3ea9e
add io lib & bug fixed
2021-10-27 23:05:25 +08:00
ValKmjolnir
95451490ca
bug fixed
2021-10-26 22:34:02 +08:00
ValKmjolnir
101714986d
optimize nasal_ast and fix bug in opr_slc2
2021-10-20 20:54:23 +08:00
ValKmjolnir
d7cffc76bd
update
2021-10-16 23:36:43 +08:00
ValKmjolnir
a7b1851967
optimize code structure
2021-10-16 21:08:57 +08:00
ValKmjolnir
a71b08a927
update
2021-10-15 22:21:57 +08:00
ValKmjolnir
645a652830
change function name and cli format
2021-10-14 23:22:28 +08:00
Li Haokun
52fbd729cc
bad access bug fixed
2021-09-13 19:55:03 +08:00
ValKmjolnir
143a59c735
update
2021-08-09 01:02:27 +08:00
ValKmjolnir
a1adb5b948
add test file
2021-08-01 22:34:02 +08:00
ValKmjolnir
ead5ca32b3
syntax bug fixed
...
syntax like:
var f=func(){}
(var a,b,c)=(1,2,3);
will be incorrectly recognized like:
var f=func(){}(var a,b,c)
this bug is fixed now.
2021-08-01 02:11:27 +08:00
Li Haokun
d1cffa76c6
update parser
...
one bug found, waiting to be fixed
2021-07-28 18:22:40 +08:00
Li Haokun
284ff5abb6
fixed bug in nasal_parse
2021-07-21 17:38:11 +08:00
Li Haokun
1a180ae01a
update
2021-07-19 17:04:45 +08:00
ValKmjolnir
81131520d7
add instruction & changes in codegen
...
add some instructions that execute const values.
the first symbol called in assignment will use op_load instead of op_meq,op_pop to assign.
2021-06-29 17:18:05 +08:00
ValKmjolnir
855e0e441f
avoid unnecessary deep copy by using rvalue ref
...
and test file update.
bug fixed in test/lexer.nas
2021-06-24 22:10:08 +08:00
ValKmjolnir
a734b99beb
performance optimization of vm/lex/parse/test
2021-06-24 00:26:26 +08:00
ValKmjolnir
f0565c7de6
change mcall to call->mcall&allow differen lvalue in assignment
2021-06-21 16:46:47 +08:00
Valk Richard Li
0f298244a2
update
2021-06-21 01:02:09 +08:00
Valk Richard Li
40a1189b18
nothing changed
2021-06-20 01:27:01 +08:00
Valk Richard Li
d9904774fc
update test file
2021-06-14 00:27:00 +08:00
Valk Richard Li
411c2e5c4c
add tips
2021-06-13 01:01:32 +08:00
Valk Richard Li
1cd627d9c7
Add command line parameters & chr supports extended ASCII
2021-06-11 15:16:06 +08:00
Valk Richard Li
166fe32839
front end optimization&stack overflow prompt
...
change parameter type to avoid unnecessary copies of string.
change stack depth from 65536<<4 to 16+(65536<<2).
now you could know stack overflow when it happens
2021-06-07 23:53:43 +08:00
Valk Richard Li
a0ff523229
more efficient str2num
2021-06-05 20:42:58 +08:00
Valk Richard Li
b2e85de7a7
bug fixed
...
a gc bug which causes fatal error.
add member value collect to make sure that nasal_val is not collected repeatedly.
use builtin_alloc in builtin function to avoid incorrect collection of value in use(gc_alloc).
change free_list to free_list[vm_type_size] to avoid too many calls of new/delete(but seems useless?)
but the most important thing is fixing this bug.
2021-05-31 19:10:59 +08:00
Valk Richard Li
20cfbfecd9
add license & other changes
...
parser recognizes syntax errors more accurately.
change some for loop to standard c++11 for(auto iter:obj)
add MIT license
change info in README.md
2021-05-04 17:39:24 +08:00
Valk Richard Li
6651fccbe8
parser reports syntax error accurately
...
still need improvement
2021-05-04 01:13:53 +08:00
Valk Richard Li
e10517b741
bug fixed & test file changes
...
compare operators now run more efficiently.
2021-03-31 20:59:13 +08:00
Valk Richard Li
a990fb606a
gc changed to mark-sweep
2021-03-27 01:08:05 +08:00
Valk Richard Li
f3370ef0f7
change map to unordered_map
2021-03-01 15:54:58 +08:00
Valk Richard Li
afef865f69
bug fixed
2021-02-13 23:57:53 +08:00
Valk Richard Li
805efbd104
update
2021-02-13 14:37:21 +08:00
Valk Richard Li
92aaef55d2
update parser to LL(1)
2021-02-13 13:28:20 +08:00
Valk Richard Li
468ad6157f
update
2021-02-13 11:09:31 +08:00
Valk Richard Li
4112a05a83
identifiers' name changed
2021-02-12 23:48:51 +08:00
Valk Richard Li
ee5f9519fe
update
2021-02-10 00:12:22 +08:00
Valk Richard Li
dfb537bbdc
update
2021-01-23 17:57:05 +08:00
Valk Richard Li
14c43c6a42
update & bug fixed
2021-01-05 23:17:32 +08:00