suppot void line in *.py inner function define

This commit is contained in:
lyon 2022-05-28 10:43:21 +08:00
parent a543d2813f
commit e0f4b346fc
4 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -1,2 +1,3 @@
def mytest():
print('test_module_2_hello')

View File

@ -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);