l0n0lc 0.8.3__py3-none-any.whl → 0.8.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
l0n0lc/jit.py CHANGED
@@ -208,9 +208,9 @@ class py2cpp编译器(ast.NodeVisitor):
208
208
 
209
209
  if isinstance(value, ast.BoolOp):
210
210
  if isinstance(value.op, ast.And):
211
- return '&&'.join([self.获取值(v) for v in value.values])
211
+ return '&&'.join([str(self.获取值(v)) for v in value.values])
212
212
  if isinstance(value.op, ast.Or):
213
- return '||'.join([self.获取值(v) for v in value.values])
213
+ return '||'.join([str(self.获取值(v)) for v in value.values])
214
214
 
215
215
  if isinstance(value, ast.IfExp):
216
216
  test = self.获取值(value.test)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: l0n0lc
3
- Version: 0.8.3
3
+ Version: 0.8.4
4
4
  Summary: 一个将python函数翻译为c++函数并运行的jit编译器
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Requires-Python: >=3.10
@@ -80,8 +80,9 @@ def test_add(a: int, b: int) -> int:
80
80
  print('test_other_fn', test_other_fn(a, b))
81
81
  print('test编译的函数', test编译的函数(a, b))
82
82
  v = 0
83
- vv = True
84
- while (vv):
83
+ vv = True and (False or 1)
84
+ print('vv:', vv)
85
+ while (True):
85
86
  py_cin(v)
86
87
  if v > 100:
87
88
  break
@@ -111,6 +112,7 @@ b 2
111
112
  Hello World 13 3
112
113
  test_other_fn 10
113
114
  test编译的函数 39
115
+ vv: 1
114
116
  请输入>>>输入的 1 小于等于100
115
117
  请输入>>>输入的 2 小于等于100
116
118
  请输入>>>输入的 100 小于等于100
@@ -122,22 +124,22 @@ test编译的函数 39
122
124
  ```bash
123
125
  ls -al ./l0n0lcoutput
124
126
  total 96
125
- drwxr-xr-x 2 root root 4096 Sep 16 01:38 .
126
- drwxrwxrwx 11 1000 1000 4096 Sep 16 01:36 ..
127
- -rw-r--r-- 1 root root 1252 Sep 16 01:38 test_add_@05ade4b088e9b383.cpp
128
- -rw-r--r-- 1 root root 246 Sep 16 01:38 test_add_@05ade4b088e9b383.h
129
- -rwxr-xr-x 1 root root 29904 Sep 16 01:38 test_add_@05ade4b088e9b383.so
130
- -rw-r--r-- 1 root root 121 Sep 16 01:38 test_other_fn_@75fdd928ab58a8e3.cpp
131
- -rw-r--r-- 1 root root 93 Sep 16 01:38 test_other_fn_@75fdd928ab58a8e3.h
132
- -rwxr-xr-x 1 root root 15616 Sep 16 01:38 test_other_fn_@75fdd928ab58a8e3.so
133
- -rw-r--r-- 1 root root 185 Sep 16 01:36 test编译的函数_@3bf4501e0408a243.cpp
134
- -rw-r--r-- 1 root root 151 Sep 16 01:36 test编译的函数_@3bf4501e0408a243.h
135
- -rwxr-xr-x 1 root root 15656 Sep 16 01:36 test编译的函数_@3bf4501e0408a243.so
127
+ drwxr-xr-x 2 root root 4096 Sep 16 01:49 .
128
+ drwxrwxrwx 11 1000 1000 4096 Sep 16 01:41 ..
129
+ -rw-r--r-- 1 root root 1318 Sep 16 01:49 test_add_@6a812a013615c16d.cpp
130
+ -rw-r--r-- 1 root root 246 Sep 16 01:49 test_add_@6a812a013615c16d.h
131
+ -rwxr-xr-x 1 root root 29968 Sep 16 01:49 test_add_@6a812a013615c16d.so
132
+ -rw-r--r-- 1 root root 121 Sep 16 01:49 test_other_fn_@75fdd928ab58a8e3.cpp
133
+ -rw-r--r-- 1 root root 93 Sep 16 01:49 test_other_fn_@75fdd928ab58a8e3.h
134
+ -rwxr-xr-x 1 root root 15616 Sep 16 01:49 test_other_fn_@75fdd928ab58a8e3.so
135
+ -rw-r--r-- 1 root root 185 Sep 16 01:41 test编译的函数_@3bf4501e0408a243.cpp
136
+ -rw-r--r-- 1 root root 151 Sep 16 01:41 test编译的函数_@3bf4501e0408a243.h
137
+ -rwxr-xr-x 1 root root 15656 Sep 16 01:41 test编译的函数_@3bf4501e0408a243.so
136
138
 
137
139
  ```
138
- ## 5. test_add_@05ade4b088e9b383.cpp
140
+ ## 5. test_add_@6a812a013615c16d.cpp
139
141
  ```c++
140
- #include "test_add_@05ade4b088e9b383.h"
142
+ #include "test_add_@6a812a013615c16d.h"
141
143
  extern "C" int64_t test_add (int64_t a, int64_t b)
142
144
  {
143
145
  if ((a > 1))
@@ -176,8 +178,9 @@ extern "C" int64_t test_add (int64_t a, int64_t b)
176
178
  std::cout<< u8"test_other_fn" << " "<< test_other_fn(a,b) << " "<< std::endl;
177
179
  std::cout<< u8"test编译的函数" << " "<< function_74657374e7bc96e8af91e79a84e587bde695b0(a,b) << " "<< std::endl;
178
180
  auto v = 0;
179
- auto vv = true;
180
- while (vv)
181
+ auto vv = true&&false||1;
182
+ std::cout<< u8"vv:" << " "<< vv << " "<< std::endl;
183
+ while (true)
181
184
  {
182
185
  std::cout << u8"请输入>>>"; std::cin >> v;
183
186
  if ((v > 100))
@@ -195,7 +198,7 @@ extern "C" int64_t test_add (int64_t a, int64_t b)
195
198
  }
196
199
 
197
200
  ```
198
- ## 6. test_add_@05ade4b088e9b383.h
201
+ ## 6. test_add_@6a812a013615c16d.h
199
202
  ```c++
200
203
  #include "test_other_fn_@75fdd928ab58a8e3.h"
201
204
  #include "test编译的函数_@3bf4501e0408a243.h"
@@ -2,11 +2,11 @@ l0n0lc/StdList.py,sha256=fA6sWAfW2JgDUhQDK2Hlx_PPuSdLwTcCTk5aha4zA-Q,863
2
2
  l0n0lc/StdMap.py,sha256=TIVKqhT078cjLIM0Zlq-TwGFSy-KwOyJe00BLFPVxr8,735
3
3
  l0n0lc/__init__.py,sha256=fUC6TMeN_fEL7HDazrBEdoWOQkXi5uSGZb7LZj6juog,137
4
4
  l0n0lc/c基础处理.py,sha256=FMauoVx4-33JXl4OLpUl1D6NCkLjk6yBH7do9WnT0Wg,5671
5
- l0n0lc/jit.py,sha256=FBGvpIeRINR2QaI4sB6fnsHjAAurHTqk9cJBOzQ_4nk,23936
5
+ l0n0lc/jit.py,sha256=MNvtnt_SPqwdJWzvkZKOSwrdN7zqjCx6KLhy5Z5bJAo,23946
6
6
  l0n0lc/编译.py,sha256=Ty4gPDHAB1jn8LgnE4w3R06bOAEeYr8iwqahYf6QeHI,2154
7
7
  l0n0lc/通用.py,sha256=O_Y4bbW1WzHCJkibxAy9WGACv-aEZJLG-fEeVBcAbBQ,3649
8
- l0n0lc-0.8.3.dist-info/licenses/LICENSE,sha256=1L-MAjulZ3kpbYwsJtlXpDVITRxykna2Ecg_521YfkA,1093
9
- l0n0lc-0.8.3.dist-info/METADATA,sha256=e0DJP_v-J92RjhpLItzAeV_qAzcvEtxHEHBQqEwFbjo,5547
10
- l0n0lc-0.8.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- l0n0lc-0.8.3.dist-info/top_level.txt,sha256=Q21D_eEY_-xgRUPwATGp9YDKSBO4w_7MI2MYxQI1aT4,7
12
- l0n0lc-0.8.3.dist-info/RECORD,,
8
+ l0n0lc-0.8.4.dist-info/licenses/LICENSE,sha256=1L-MAjulZ3kpbYwsJtlXpDVITRxykna2Ecg_521YfkA,1093
9
+ l0n0lc-0.8.4.dist-info/METADATA,sha256=FM7tcMjK56Kteal4Er5l8MB2pGGaU77UDaWRH2E2em0,5660
10
+ l0n0lc-0.8.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ l0n0lc-0.8.4.dist-info/top_level.txt,sha256=Q21D_eEY_-xgRUPwATGp9YDKSBO4w_7MI2MYxQI1aT4,7
12
+ l0n0lc-0.8.4.dist-info/RECORD,,
File without changes