mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
suppot void line in *.py inner function define
This commit is contained in:
parent
a543d2813f
commit
e0f4b346fc
@ -101,5 +101,5 @@ class ByteArray(List):
|
||||
|
||||
|
||||
class Utils(TinyObj):
|
||||
def int_to_bytes(val: int) -> bytes:
|
||||
def int_to_bytes(self, val: int) -> bytes:
|
||||
pass
|
||||
|
@ -101,5 +101,5 @@ class ByteArray(List):
|
||||
|
||||
|
||||
class Utils(TinyObj):
|
||||
def int_to_bytes(val: int) -> bytes:
|
||||
def int_to_bytes(self, val: int) -> bytes:
|
||||
pass
|
||||
|
@ -1,2 +1,3 @@
|
||||
def mytest():
|
||||
|
||||
print('test_module_2_hello')
|
||||
|
@ -102,6 +102,10 @@ int pikaCompileFileWithOutputName(char* output_file_name,
|
||||
return 1;
|
||||
}
|
||||
char* lines = (char*)arg_getBytes(input_file_arg);
|
||||
/* replace the "\r\n" to "\n" */
|
||||
lines = strsReplace(&buffs, lines, "\r\n", "\n");
|
||||
/* clear the void line */
|
||||
lines = strsReplace(&buffs, lines, "\n\n", "\n");
|
||||
/* add '\n' at the end */
|
||||
lines = strsAppend(&buffs, lines, "\n\n");
|
||||
pikaCompile(output_file_name, lines);
|
||||
|
Loading…
x
Reference in New Issue
Block a user