zuspec-dataclasses 0.0.1.6364580335__py2.py3-none-any.whl → 0.0.1.6365096825__py2.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.
- zsp_dataclasses/impl/generators/zsp_data_model_cpp_gen.py +19 -8
- {zuspec_dataclasses-0.0.1.6364580335.dist-info → zuspec_dataclasses-0.0.1.6365096825.dist-info}/METADATA +1 -1
- {zuspec_dataclasses-0.0.1.6364580335.dist-info → zuspec_dataclasses-0.0.1.6365096825.dist-info}/RECORD +6 -6
- {zuspec_dataclasses-0.0.1.6364580335.dist-info → zuspec_dataclasses-0.0.1.6365096825.dist-info}/LICENSE +0 -0
- {zuspec_dataclasses-0.0.1.6364580335.dist-info → zuspec_dataclasses-0.0.1.6365096825.dist-info}/WHEEL +0 -0
- {zuspec_dataclasses-0.0.1.6364580335.dist-info → zuspec_dataclasses-0.0.1.6365096825.dist-info}/top_level.txt +0 -0
@@ -23,7 +23,7 @@
|
|
23
23
|
import zsp_dataclasses.impl.context as ctxt_api
|
24
24
|
from vsc_dataclasses.impl.generators.vsc_data_model_cpp_gen import VscDataModelCppGen
|
25
25
|
from vsc_dataclasses.impl.pyctxt.data_type_struct import DataTypeStruct
|
26
|
-
from ..context import DataTypeAction, DataTypeComponent, DataTypeFunction, TypeExec, TypeExprMethodCallStatic, TypeProcStmtExpr
|
26
|
+
from ..context import DataTypeAction, DataTypeComponent, DataTypeFunction, TypeExec, TypeExprMethodCallStatic, TypeProcStmtExpr, TypeProcStmtScope
|
27
27
|
from ..pyctxt.visitor_base import VisitorBase
|
28
28
|
|
29
29
|
class ZspDataModelCppGen(VscDataModelCppGen,VisitorBase):
|
@@ -56,7 +56,7 @@ class ZspDataModelCppGen(VscDataModelCppGen,VisitorBase):
|
|
56
56
|
self._ctxt,
|
57
57
|
f.name()))
|
58
58
|
if len(f.getImportSpecs()) > 0:
|
59
|
-
self.println("%s_t->addImportSpec(" % self.
|
59
|
+
self.println("%s_t->addImportSpec(" % (self.leaf_name(f.name())))
|
60
60
|
self.inc_indent()
|
61
61
|
self.println("%s->mkDataTypeFunctionImport(\"%s\", false, false)" % (
|
62
62
|
self._ctxt,
|
@@ -134,6 +134,7 @@ class ZspDataModelCppGen(VscDataModelCppGen,VisitorBase):
|
|
134
134
|
self._emit_type_mode += 1
|
135
135
|
i.getReturnType().accept(self)
|
136
136
|
self._emit_type_mode -= 1
|
137
|
+
self.println("false") # own_rtype
|
137
138
|
self.dec_indent()
|
138
139
|
self.println(");")
|
139
140
|
self.println("%s->addDataTypeFunction(%s_t);" % (self._ctxt, i.name()))
|
@@ -154,18 +155,15 @@ class ZspDataModelCppGen(VscDataModelCppGen,VisitorBase):
|
|
154
155
|
ctxt_api.ExecKindT.PreSolve : "zsp::arl::dm::ExecKindT::PreSolve",
|
155
156
|
ctxt_api.ExecKindT.PostSolve : "zsp::arl::dm::ExecKindT::PostSolve",
|
156
157
|
}
|
157
|
-
self.println("%s_t->addExec(%s->
|
158
|
+
self.println("%s_t->addExec(%s->mkTypeExecProc(" % (
|
158
159
|
self.leaf_name(self._type_s[-1].name()),
|
159
160
|
self._ctxt
|
160
161
|
))
|
161
162
|
self.inc_indent()
|
162
163
|
self.println("%s," % exec_kind_m[i.getKind()])
|
163
|
-
self.println("%s->mkTypeProcStmtScope({" % self._ctxt)
|
164
164
|
self.inc_indent()
|
165
165
|
i.getBody().accept(self)
|
166
166
|
self.dec_indent()
|
167
|
-
self.println("})")
|
168
|
-
self.dec_indent()
|
169
167
|
self.println("));")
|
170
168
|
|
171
169
|
def visitTypeExprBin(self, i : 'TypeExprBin'):
|
@@ -183,9 +181,10 @@ class ZspDataModelCppGen(VscDataModelCppGen,VisitorBase):
|
|
183
181
|
i.getTarget().name()))
|
184
182
|
self.println("{")
|
185
183
|
self.inc_indent()
|
186
|
-
|
187
|
-
|
184
|
+
for ii,p in enumerate(i.getParameters()):
|
185
|
+
self.push_comma(ii+1 < len(i.getParameters()))
|
188
186
|
p.accept(self)
|
187
|
+
self.pop_comma()
|
189
188
|
self.dec_indent()
|
190
189
|
self.println("}")
|
191
190
|
self.dec_indent()
|
@@ -249,11 +248,23 @@ class ZspDataModelCppGen(VscDataModelCppGen,VisitorBase):
|
|
249
248
|
|
250
249
|
def visitTypeProcStmtExpr(self, i: TypeProcStmtExpr):
|
251
250
|
self.println("%s->mkTypeProcStmtExpr(" % self._ctxt)
|
251
|
+
self.inc_indent()
|
252
252
|
self.push_comma(False)
|
253
253
|
i.getExpr().accept(self)
|
254
254
|
self.pop_comma()
|
255
|
+
self.dec_indent()
|
255
256
|
self.println(")%s" % self.comma())
|
256
257
|
|
258
|
+
def visitTypeProcStmtScope(self, i: TypeProcStmtScope):
|
259
|
+
self.println("%s->mkTypeProcStmtScope({" % self._ctxt)
|
260
|
+
self.inc_indent()
|
261
|
+
for ii,s in enumerate(i.getStatements()):
|
262
|
+
self.push_comma(ii+1 < len(i.getStatements()))
|
263
|
+
s.accept(self)
|
264
|
+
self.pop_comma()
|
265
|
+
self.dec_indent()
|
266
|
+
self.println("})%s" % self.comma())
|
267
|
+
|
257
268
|
|
258
269
|
|
259
270
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: zuspec-dataclasses
|
3
|
-
Version: 0.0.1.
|
3
|
+
Version: 0.0.1.6365096825
|
4
4
|
Summary: Front-end for capturing Action Relation Level models using dataclasses
|
5
5
|
Home-page: https://github.com/zuspec/zuspec-dataclasses
|
6
6
|
Author: Matthew Ballance
|
@@ -81,7 +81,7 @@ zsp_dataclasses/impl/typeinfo_flow_obj_ref.py,sha256=NhNwKY2Qp6umQWgPRpAyqLPQsjX
|
|
81
81
|
zsp_dataclasses/impl/typeinfo_pool.py,sha256=-fbPtyoiorI1GwEKxXEn6Birxq4WJCNn_0exAwTAIdw,443
|
82
82
|
zsp_dataclasses/impl/typeinfo_struct.py,sha256=JF-1NJGaNxgm6aTEkNHPEx230yMXExnORLlJIHe4KBI,333
|
83
83
|
zsp_dataclasses/impl/generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
84
|
-
zsp_dataclasses/impl/generators/zsp_data_model_cpp_gen.py,sha256=
|
84
|
+
zsp_dataclasses/impl/generators/zsp_data_model_cpp_gen.py,sha256=BzHQeT3x0SbqeIipb2zE4K5Fhyvt8sJAewV3SiCswKg,9819
|
85
85
|
zsp_dataclasses/impl/pyctxt/context.py,sha256=KWcgCABeDSRre5de6HHpmuqUmpb6vzLppz2DZPGQD60,5223
|
86
86
|
zsp_dataclasses/impl/pyctxt/data_type_action.py,sha256=v5DR7eFqov0_iPMhLE30meuqMM98YQ0VcMV7_P1FPas,1622
|
87
87
|
zsp_dataclasses/impl/pyctxt/data_type_activity_replicate.py,sha256=RE3uNEAjs-FeeThN-KClneFCXWAfTuefaA0Fhlui_38,1298
|
@@ -104,8 +104,8 @@ zsp_dataclasses/impl/pyctxt/visitor_base.py,sha256=G5DiaYlfULVmOyRLnIV4m1Gb70FeX
|
|
104
104
|
zsp_dataclasses/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
105
105
|
zsp_dataclasses/util/extract_cpp_embedded_dsl.py,sha256=SyMMLumZD6fsubj40hyekYzWyrcoUGTijJH3NmK1ihY,5630
|
106
106
|
zsp_dataclasses/util/gen_cpp_dt_defs/__main__.py,sha256=LdfPAEzhMPtW1Ie15A5pmYAlL8DQFj-l7Pbey3EJiJg,3391
|
107
|
-
zuspec_dataclasses-0.0.1.
|
108
|
-
zuspec_dataclasses-0.0.1.
|
109
|
-
zuspec_dataclasses-0.0.1.
|
110
|
-
zuspec_dataclasses-0.0.1.
|
111
|
-
zuspec_dataclasses-0.0.1.
|
107
|
+
zuspec_dataclasses-0.0.1.6365096825.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
108
|
+
zuspec_dataclasses-0.0.1.6365096825.dist-info/METADATA,sha256=aJ8acCMq9O6_hcZ4SwO7_ZNlCRj0vQ8dQ9l6TfgfvgI,499
|
109
|
+
zuspec_dataclasses-0.0.1.6365096825.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
|
110
|
+
zuspec_dataclasses-0.0.1.6365096825.dist-info/top_level.txt,sha256=BHigRYcGvNv_xCJUUv5OXgSPSoczsH3Tle0gABks4l0,16
|
111
|
+
zuspec_dataclasses-0.0.1.6365096825.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|