Lines Matching full:environment
6 from jinja2 import Environment
15 def emit_union_declaration(environment: Environment, node: _XdrUnion) -> None: argument
18 template = get_jinja2_template(environment, "declaration", "close")
23 environment: Environment, node: _XdrDeclaration argument
27 template = get_jinja2_template(environment, "definition", "switch_spec")
38 environment: Environment, node: _XdrDeclaration argument
44 template = get_jinja2_template(environment, "definition", "case_spec")
54 def emit_union_definition(environment: Environment, node: _XdrUnion) -> None: argument
56 template = get_jinja2_template(environment, "definition", "open")
59 emit_union_switch_spec_definition(environment, node.discriminant)
62 emit_union_case_spec_definition(environment, case)
65 emit_union_case_spec_definition(environment, node.default)
67 template = get_jinja2_template(environment, "definition", "close")
72 environment: Environment, node: _XdrDeclaration argument
76 template = get_jinja2_template(environment, "decoder", "switch_spec")
80 def emit_union_case_spec_decoder(environment: Environment, node: _XdrCaseSpec) -> None: argument
86 template = get_jinja2_template(environment, "decoder", "case_spec")
91 template = get_jinja2_template(environment, "decoder", node.arm.template)
100 template = get_jinja2_template(environment, "decoder", "break")
104 def emit_union_default_spec_decoder(environment: Environment, node: _XdrUnion) -> None: argument
112 template = get_jinja2_template(environment, "decoder", "default_spec")
116 template = get_jinja2_template(environment, "decoder", "break")
121 template = get_jinja2_template(environment, "decoder", default_case.arm.template)
131 def emit_union_decoder(environment: Environment, node: _XdrUnion) -> None: argument
133 template = get_jinja2_template(environment, "decoder", "open")
136 emit_union_switch_spec_decoder(environment, node.discriminant)
139 emit_union_case_spec_decoder(environment, case)
141 emit_union_default_spec_decoder(environment, node)
143 template = get_jinja2_template(environment, "decoder", "close")
148 environment: Environment, node: _XdrDeclaration argument
152 template = get_jinja2_template(environment, "encoder", "switch_spec")
156 def emit_union_case_spec_encoder(environment: Environment, node: _XdrCaseSpec) -> None: argument
162 template = get_jinja2_template(environment, "encoder", "case_spec")
167 template = get_jinja2_template(environment, "encoder", node.arm.template)
175 template = get_jinja2_template(environment, "encoder", "break")
179 def emit_union_default_spec_encoder(environment: Environment, node: _XdrUnion) -> None: argument
187 template = get_jinja2_template(environment, "encoder", "default_spec")
191 template = get_jinja2_template(environment, "encoder", "break")
196 template = get_jinja2_template(environment, "encoder", default_case.arm.template)
205 def emit_union_encoder(environment, node: _XdrUnion) -> None: argument
207 template = get_jinja2_template(environment, "encoder", "open")
210 emit_union_switch_spec_encoder(environment, node.discriminant)
213 emit_union_case_spec_encoder(environment, case)
215 emit_union_default_spec_encoder(environment, node)
217 template = get_jinja2_template(environment, "encoder", "close")
226 self.environment = create_jinja2_environment(language, "union")
231 emit_union_declaration(self.environment, node)
235 emit_union_definition(self.environment, node)
239 emit_union_decoder(self.environment, node)
243 emit_union_encoder(self.environment, node)