Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 17, 2024
1 parent 46f5950 commit d86f76e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crosstl/src/backend/DirectX/DirectxAst.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def __init__(self, condition, body):
def __repr__(self):
return f"WhileNode(condition={self.condition}, body={self.body})"


class DoWhileNode(ASTNode):
def __init__(self, condition, body):
self.condition = condition
Expand All @@ -102,6 +103,7 @@ def __init__(self, condition, body):
def __repr__(self):
return f"DoWhileNode(condition={self.condition}, body={self.body})"


class ReturnNode(ASTNode):
def __init__(self, value):
self.value = value
Expand Down
1 change: 1 addition & 0 deletions tests/test_backend/test_directx/test_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def test_while_codegen():
except SyntaxError:
pytest.fail("While loop parsing or code generation not implemented.")


def test_do_while_codegen():
code = """
struct VSInput {
Expand Down
1 change: 1 addition & 0 deletions tests/test_backend/test_directx/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def test_while_parsing():
except SyntaxError:
pytest.fail("while parsing not implemented")


def test_do_while_parsing():
code = """
VSOutput VSMain(VSInput input) {
Expand Down

0 comments on commit d86f76e

Please sign in to comment.