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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: codegen-2
3
- Version: 2.9.0
3
+ Version: 2.10.0
4
4
  Summary: Meta-programming
5
5
  License: MIT
6
6
  Author: Binh Vu
@@ -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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "codegen-2"
3
- version = "2.9.0"
3
+ version = "2.10.0"
4
4
  description = "Meta-programming"
5
5
  authors = ["Binh Vu <binh@toan2.com>"]
6
6
  license = "MIT"
File without changes
File without changes