codegen-2 2.9.0__tar.gz → 2.10.0__tar.gz
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.
- {codegen_2-2.9.0 → codegen_2-2.10.0}/PKG-INFO +1 -1
- {codegen_2-2.9.0 → codegen_2-2.10.0}/codegen/models/expr.py +22 -0
- {codegen_2-2.9.0 → codegen_2-2.10.0}/pyproject.toml +1 -1
- {codegen_2-2.9.0 → codegen_2-2.10.0}/LICENSE +0 -0
- {codegen_2-2.9.0 → codegen_2-2.10.0}/README.md +0 -0
- {codegen_2-2.9.0 → codegen_2-2.10.0}/codegen/__init__.py +0 -0
- {codegen_2-2.9.0 → codegen_2-2.10.0}/codegen/models/__init__.py +0 -0
- {codegen_2-2.9.0 → codegen_2-2.10.0}/codegen/models/ast.py +0 -0
- {codegen_2-2.9.0 → codegen_2-2.10.0}/codegen/models/program.py +0 -0
- {codegen_2-2.9.0 → codegen_2-2.10.0}/codegen/models/statement.py +0 -0
- {codegen_2-2.9.0 → codegen_2-2.10.0}/codegen/models/types.py +0 -0
- {codegen_2-2.9.0 → codegen_2-2.10.0}/codegen/models/var.py +0 -0
|
@@ -235,6 +235,28 @@ class ExprNegation(Expr):
|
|
|
235
235
|
return f"not {self.expr.to_wrapped_python()}"
|
|
236
236
|
|
|
237
237
|
|
|
238
|
+
@dataclass
|
|
239
|
+
class ExprLogicalAnd(Expr):
|
|
240
|
+
terms: Sequence[Expr]
|
|
241
|
+
|
|
242
|
+
def to_python(self):
|
|
243
|
+
return f" and ".join([term.to_python() for term in self.terms])
|
|
244
|
+
|
|
245
|
+
def to_typescript(self):
|
|
246
|
+
return f" && ".join([term.to_typescript() for term in self.terms])
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
@dataclass
|
|
250
|
+
class ExprLogicalOr(Expr):
|
|
251
|
+
terms: Sequence[Expr]
|
|
252
|
+
|
|
253
|
+
def to_python(self):
|
|
254
|
+
return f" or ".join([term.to_python() for term in self.terms])
|
|
255
|
+
|
|
256
|
+
def to_typescript(self):
|
|
257
|
+
return f" || ".join([term.to_typescript() for term in self.terms])
|
|
258
|
+
|
|
259
|
+
|
|
238
260
|
@dataclass
|
|
239
261
|
class ExprDivision(Expr):
|
|
240
262
|
left: Expr
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|