codegen-2 2.15.2__tar.gz → 2.15.3__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.4
2
2
  Name: codegen-2
3
- Version: 2.15.2
3
+ Version: 2.15.3
4
4
  Summary: Meta-programming
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -342,6 +342,9 @@ class IfStatement(Statement):
342
342
  def to_python(self):
343
343
  return f"if {self.cond.to_python()}:"
344
344
 
345
+ def to_typescript(self):
346
+ return f"if ({self.cond.to_typescript()})"
347
+
345
348
 
346
349
  @dataclass
347
350
  class TryStatement(Statement):
@@ -364,6 +367,9 @@ class ElseStatement(Statement):
364
367
  def to_python(self):
365
368
  return "else:"
366
369
 
370
+ def to_typescript(self):
371
+ return "else"
372
+
367
373
 
368
374
  @dataclass
369
375
  class Comment(Statement):
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "codegen-2"
3
- version = "2.15.2"
3
+ version = "2.15.3"
4
4
  description = "Meta-programming"
5
5
  authors = ["Binh Vu <binh@toan2.com>"]
6
6
  license = "MIT"
File without changes
File without changes