omdev 0.0.0.dev437__py3-none-any.whl → 0.0.0.dev439__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.
- omdev/__about__.py +1 -1
- omdev/amalg/gen/srcfiles.py +13 -0
- omdev/scripts/inject.py +2039 -0
- omdev/scripts/marshal.py +1689 -0
- omdev/tokens/utils.py +2 -1
- omdev/tools/json/cli.py +6 -6
- omdev/tools/json/parsing.py +5 -5
- omdev/tools/json/rendering.py +2 -2
- {omdev-0.0.0.dev437.dist-info → omdev-0.0.0.dev439.dist-info}/METADATA +4 -4
- {omdev-0.0.0.dev437.dist-info → omdev-0.0.0.dev439.dist-info}/RECORD +14 -12
- {omdev-0.0.0.dev437.dist-info → omdev-0.0.0.dev439.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev437.dist-info → omdev-0.0.0.dev439.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev437.dist-info → omdev-0.0.0.dev439.dist-info}/licenses/LICENSE +0 -0
- {omdev-0.0.0.dev437.dist-info → omdev-0.0.0.dev439.dist-info}/top_level.txt +0 -0
omdev/__about__.py
CHANGED
omdev/amalg/gen/srcfiles.py
CHANGED
@@ -40,6 +40,17 @@ class SrcFile:
|
|
40
40
|
has_binary_resources: bool = False
|
41
41
|
|
42
42
|
|
43
|
+
def drop_amalg_comment_lines(lines: ta.Iterable[tks.Tokens]) -> list[tks.Tokens]:
|
44
|
+
out: list[tks.Tokens] = []
|
45
|
+
for l in lines:
|
46
|
+
cl = list(tks.ignore_ws(l, drop_nl=True, keep=['COMMENT']))
|
47
|
+
if len(cl) == 1 and (t := cl[0]).name == 'COMMENT':
|
48
|
+
if t.src.split()[1:2] == ['@omlish-amalg']:
|
49
|
+
continue
|
50
|
+
out.append(l)
|
51
|
+
return out
|
52
|
+
|
53
|
+
|
43
54
|
def make_src_file(
|
44
55
|
path: str,
|
45
56
|
*,
|
@@ -51,6 +62,8 @@ def make_src_file(
|
|
51
62
|
tokens = tks.src_to_tokens(src)
|
52
63
|
lines = tks.split_lines(tokens)
|
53
64
|
|
65
|
+
lines = drop_amalg_comment_lines(lines)
|
66
|
+
|
54
67
|
header_lines, cls = split_header_lines(lines)
|
55
68
|
|
56
69
|
header_lines = strip_header_lines(header_lines)
|