251 Commits

Author SHA1 Message Date
pikastech
e0eee73209 support dir() builtin, fix str disp in list... 2022-08-10 11:49:54 +08:00
pikastech
57d89e256f support try_expect for open 2022-08-06 17:59:32 +08:00
pikastech
525f08e088 fix for in dict 2022-08-02 13:52:20 +08:00
pikastech
4899884747 use u32 for mem info
add speed by using register in for-loop

fix ci_benchmark
2022-07-31 11:14:49 +08:00
pikastech
a40f68e9b2 use more inline in PikaVM
use static refcnt in PikaObj

use static _clsptr
2022-07-30 21:26:46 +08:00
pikastech
117096a764 correct the sort of fun dec in .h
fix .h and .pyi

update PikaMath

update pika_cjson
2022-07-30 18:56:20 +08:00
pikastech
1d7bcf2a39 use __getitem__ __setitem__ instead of __get__ __set__ 2022-07-29 23:40:16 +08:00
pikastech
de10086338 add arg_new<T> api
update version
2022-07-20 10:34:50 +08:00
pikastech
4ca4c4ac52 update version 2022-07-18 15:46:35 +08:00
pikastech
15c0985d2e add lseek() function
support readline(), readlines(), writelines() for FILEIO
2022-07-18 15:23:35 +08:00
李昂
d9349b7812 !61 Support seek() and tell() for FILEIO
* fix FILEIO.seek()
* return ftell in FILEIO.seek()
* fix test
* support seek() and tell() for FILEIO
2022-07-18 05:29:43 +00:00
pikastech
f019b5ca79 hex(0) return '0x00' 2022-07-15 10:47:24 +08:00
pikastech
dddd6f7367 add const to PikaParser 2022-07-15 10:30:38 +08:00
李昂
45a07c5773 !58 Support read() builtin
* support read(-1)
* add example
2022-07-15 02:06:23 +00:00
李昂
e7e501ab73 !56 Support tuple literal
* Merge branch 'master' into tuple
* sue SyntaxItemList
* cut the parser
* update preCompiler
* not use tiny_obj in stdlib
* use BUILTIN_STRUCT_ENABLE for list, dict, tuple
* add PikaStdData.Tuple()
* !51 Support bind .pyi from other *.py expect main.py
* fix overflow issue
* fix overflow issue and simplification code
* update PikaCV_Image.c.
2022-07-14 08:36:02 +00:00
pikastech
8f9950d4ae support decode() and encode()
for PikaStdData.String() and PikaStdData.ByteArray()

use example/BuiltIn/encode_decode.py

fix CI
2022-07-14 12:02:38 +08:00
pikastech
8889671586 push binascii to package 2022-07-14 10:59:51 +08:00
pikastech
0921ee69c4 simplify the byteCodeGen main.c 2022-07-11 23:17:25 +08:00
李昂
660a97110f !47 not use suger to parse slice
* use __vm_[get/slice] for sysobj
* not use suger in slice
* parser for new slice is ok
* add SLC ins
2022-07-11 06:42:12 +00:00
李昂
76db2494a5 !46 try to support [][], not ok yeat
* fix typo in test
* Merge branch 'master' into slice
* adding slice to parser from suger
2022-07-11 03:14:14 +00:00
lyon
41b6409be3 support b2a_hex() for PikaStdData.Utils 2022-07-06 16:20:12 +08:00
lyon
1bd3b367f4 fix str(None) return other string 2022-07-06 15:13:23 +08:00
李昂
4a943b479c !41 Support chain invoke like < String('test').split() >
* support chain invoke ok
* add test for S(S.replace()).replace()
* parse to RUN .split
* try to support chain invoke, not ok
* can devide a chain
2022-07-05 06:23:49 +00:00
李昂
81a5f0b965 !40 support configparser_read_string
* configparser read_string is ok
* support replace() and strip() for StdData.String()
* add file and test of configparser
2022-07-04 07:16:44 +00:00
pikastech
f51c9a05d2 update stdlib, fix ac5 2022-07-01 23:41:32 +08:00
Lyon
a9370691d2 fix image size overflow for g030 2022-07-01 22:55:29 +08:00
pikastech
8aaf317689 fix print normal object 2022-06-30 17:33:06 +08:00
pikastech
944503cd23 support return val from type() 2022-06-30 16:10:38 +08:00
pikastech
865290df74 support len() for object and __len__().
* list, dict, dict_keys is ok
2022-06-24 18:18:06 +08:00
pikastech
3e371e9e57 fix a[1] = 1 not work inner function() 2022-06-24 16:08:27 +08:00
李昂
e6a33c058e !34 Support __str__() for PikaStdData.List(),PikaStdData.Dict(),PikaStdData.dict_keys(),
* print list as '[x,x,x]'
* support __str__ for Dict
* support __str__ for dict_keys()
2022-06-24 03:30:56 +00:00
pikastech
ff16099da5 test iter() for keys is ok 2022-06-23 17:46:50 +08:00
pikastech
fca634f3cc use -> List 2022-06-21 17:49:18 +08:00
pikastech
1087ed0674 support split() for String Class 2022-06-21 17:42:03 +08:00
李昂
e31135ba90 !31 fix run context problem when call the callback function
* remove __pikaMain from StdTask
* support run arg from other context(file name space)
* format
* use def_context in callback
* supporting def_context, not ok
2022-06-21 03:29:29 +00:00
pikastech
f30dd75da1 fix mem_lack for StdData_List 2022-06-16 01:18:11 +08:00
pikastech
c02ffb51ab fix double __init__ when 'import as' 2022-06-15 14:49:17 +08:00
李昂
5349a56656 !26 run the __init__ when init the meta obj
* run __init__ when init the meta_obj
* clean dead code
2022-06-15 06:20:34 +00:00
pikastech
77f1879180 add id() built-in 2022-06-14 12:06:56 +08:00
李昂
6acc0f9ecd !25 support format output for print()
* test for format with tuple is ok
* 'format'%var is ok (tuple var is not ok)
* rename _cformat to cformat()
* optimize the memory usage of format_list
* add string-test.cpp
* cformat() is ok
* fix variable par load issue
* use test_common.h
* use test_common to simplify the gtest case
* Merge branch 'master' into dev
* fix float->double for bytecodegen
* update to /package
* Use double in C for float in python
2022-06-14 03:20:17 +00:00
李昂
5148412411 !24 support double in C Module
* Merge branch 'master' into dev
* fix float->double for bytecodegen
* update to /package
* Use double in C for float in python
2022-06-13 10:02:59 +00:00
李昂
b02672b130 !21 Support variable pars for print()
* update pre-compiler
* test passed for variable pars of print()
* variable pars is tested ok for print()
* skip arg_num check for variable
* support *val in the preCompiler
* add file
* Merge branch 'dev' of https://gitee.com/lyon1998/pikascript into dev
* fix warning
* both update ByteCodeGen
* use super instead of parent
* create PikaList C list struct
* use args inner the PikaStdData.List()
* use PikaDict in PikaStdData.Dict()
* support dict in c
* support dict in c
* clean Tinyobj
2022-06-11 14:56:51 +00:00
pikastech
a87da14c7d move print() and print_no_end from BaseObj to SysObj 2022-06-10 12:04:06 +08:00
pikastech
2afaea6e7c support str() from bytes to string 2022-06-10 11:34:46 +08:00
pikastech
f0b5be9c92 support len() for bytes 2022-06-10 10:55:48 +08:00
pikastech
2c17be4191 __slice__ equal to __get__ when SLICE_ENABLE off 2022-06-08 10:27:23 +08:00
pikastech
0daf46c269 fix for_loop runError in module 2022-06-08 10:00:54 +08:00
pikastech
30209aff77 support return Object in CModule 2022-06-06 09:13:27 +08:00
pikastech
c6aa57c06f use the relative path for PikaStdData_String_Util.h 2022-06-02 22:48:58 +08:00
purewind7
f1209ead44 add some methods for string 2022-06-02 20:26:35 +08:00