string-to-code 0.2.9__py3-none-any.whl → 0.2.10__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.
- string_to_code/c_like_utils.py +1 -1
- string_to_code/core.py +3 -3
- string_to_code/utils.py +1 -1
- {string_to_code-0.2.9.dist-info → string_to_code-0.2.10.dist-info}/METADATA +1 -1
- {string_to_code-0.2.9.dist-info → string_to_code-0.2.10.dist-info}/RECORD +7 -7
- {string_to_code-0.2.9.dist-info → string_to_code-0.2.10.dist-info}/LICENSE +0 -0
- {string_to_code-0.2.9.dist-info → string_to_code-0.2.10.dist-info}/WHEEL +0 -0
string_to_code/c_like_utils.py
CHANGED
|
@@ -57,7 +57,7 @@ def get_merge_to_full_function(in_function_prefix):
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
def get_main_call_fun(in_call_function_or_atom):
|
|
60
|
-
"""returns function
|
|
60
|
+
"""returns function returning code of main C or C++ function"""
|
|
61
61
|
|
|
62
62
|
def _main_call(in_initial_call, **kwargs):
|
|
63
63
|
initial_call_str = (
|
string_to_code/core.py
CHANGED
|
@@ -33,7 +33,7 @@ SimpleFunctions: typing.TypeAlias = typing.List[SimpleFunction]
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
def str_pieces(in_str: str, in_pieces_len: typing.List[int]) -> Strings:
|
|
36
|
-
"""returns in_str
|
|
36
|
+
"""returns in_str split into pieces of lengths as in in_pieces_len"""
|
|
37
37
|
assert all(_ > 0 for _ in in_pieces_len)
|
|
38
38
|
assert sum(in_pieces_len) == len(in_str)
|
|
39
39
|
cur_str = in_str
|
|
@@ -74,7 +74,7 @@ def _interesting_random_split(in_str: str) -> Strings:
|
|
|
74
74
|
def get_function_namer(
|
|
75
75
|
in_name_prefix: str = "f_",
|
|
76
76
|
) -> collections.abc.Callable[[int], str]:
|
|
77
|
-
"""returns a
|
|
77
|
+
"""returns a default function namer"""
|
|
78
78
|
|
|
79
79
|
def _inner(in_id: int) -> str:
|
|
80
80
|
return in_name_prefix + str(in_id)
|
|
@@ -147,5 +147,5 @@ class PrinterProgram:
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
def get_printer_program(in_str: str) -> PrinterProgram:
|
|
150
|
-
"""returns a PrinterProgram object
|
|
150
|
+
"""returns a PrinterProgram object displaying in_str"""
|
|
151
151
|
return PrinterProgram(*_prepare_printer_program(in_str))
|
string_to_code/utils.py
CHANGED
|
@@ -6,7 +6,7 @@ from . import core
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def get_function_name_fun(in_prefix: str = "fun_"):
|
|
9
|
-
"""returns a function
|
|
9
|
+
"""returns a function returning a function name based on id"""
|
|
10
10
|
|
|
11
11
|
def _get_function_name(in_function_id: int, **kwargs) -> str:
|
|
12
12
|
return kwargs.get("function_id_to_name", core.get_function_namer(in_prefix))(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
string_to_code/README.md,sha256=A8BkDQpr-Os630YfGnaU-i_kigyVB8bNLhvLfIyzQR8,1225
|
|
2
2
|
string_to_code/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
string_to_code/c_like_utils.py,sha256=
|
|
4
|
-
string_to_code/core.py,sha256=
|
|
3
|
+
string_to_code/c_like_utils.py,sha256=YiRkzo1e4oKAnWjUkgEy6rxkOYb1VlFVFz52otFR4AQ,2092
|
|
4
|
+
string_to_code/core.py,sha256=VCiXEf7ojoc_1lxTiYlU3rav7Xcl-CGtUPuxSjYncuA,4351
|
|
5
5
|
string_to_code/string_to_code.py,sha256=q0IyBfeDeDI2SCwlBOM_hwHdBfF1YQ7gn642o6cHU94,1290
|
|
6
6
|
string_to_code/to_ada.py,sha256=cGZ8VFdAZkGYKGzEOEsAndGzfUt4bSCmZfQP04sAOF8,2265
|
|
7
7
|
string_to_code/to_algol68.py,sha256=Y1jvfI5xbk-PHVWYW7KG7gSIUU5GPt7gjeaMuM6JIIQ,1642
|
|
@@ -17,8 +17,8 @@ string_to_code/to_nim.py,sha256=W74i6MRjQ5eYeatGyMwE-wYNEzN06l5oOXBv3lfbXgM,1534
|
|
|
17
17
|
string_to_code/to_pascal.py,sha256=ZwOJgi3saoNP2_H7ZWpQykPg8c-jP-L8eOw_Zz2q8uc,1922
|
|
18
18
|
string_to_code/to_python3.py,sha256=BJwjyhRB2IBOE3-xwkkMV3vZU-e2xreppYBKQeA1whg,1589
|
|
19
19
|
string_to_code/to_rust.py,sha256=hTCjlortLhR7FwsBgbrFRcwXpKWA6ed2UYnz1OK8R7I,1926
|
|
20
|
-
string_to_code/utils.py,sha256=
|
|
21
|
-
string_to_code-0.2.
|
|
22
|
-
string_to_code-0.2.
|
|
23
|
-
string_to_code-0.2.
|
|
24
|
-
string_to_code-0.2.
|
|
20
|
+
string_to_code/utils.py,sha256=m1QExBHCD3q-Tjkfl3HiFgjZUbPISZYIYOcr-FB0HGU,3504
|
|
21
|
+
string_to_code-0.2.10.dist-info/LICENSE,sha256=LQrcSkcUyN1FtFYDxWK05puxNN9o2q8PV-_2SwFDTWc,1068
|
|
22
|
+
string_to_code-0.2.10.dist-info/METADATA,sha256=482iLKXvXjtYG41tnW2A6qgbOjGW6FyJ-g6P5pR1Rbw,1850
|
|
23
|
+
string_to_code-0.2.10.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
24
|
+
string_to_code-0.2.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|