From d86f76ed7042cd8f95e46f037e0377c84e63e2ba Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:40:28 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- crosstl/src/backend/DirectX/DirectxAst.py | 2 ++ tests/test_backend/test_directx/test_codegen.py | 1 + tests/test_backend/test_directx/test_parser.py | 1 + 3 files changed, 4 insertions(+) diff --git a/crosstl/src/backend/DirectX/DirectxAst.py b/crosstl/src/backend/DirectX/DirectxAst.py index f0900f1..ac88d52 100644 --- a/crosstl/src/backend/DirectX/DirectxAst.py +++ b/crosstl/src/backend/DirectX/DirectxAst.py @@ -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 @@ -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 diff --git a/tests/test_backend/test_directx/test_codegen.py b/tests/test_backend/test_directx/test_codegen.py index 8f66ecc..29eddfe 100644 --- a/tests/test_backend/test_directx/test_codegen.py +++ b/tests/test_backend/test_directx/test_codegen.py @@ -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 { diff --git a/tests/test_backend/test_directx/test_parser.py b/tests/test_backend/test_directx/test_parser.py index 6ab507f..d36590a 100644 --- a/tests/test_backend/test_directx/test_parser.py +++ b/tests/test_backend/test_directx/test_parser.py @@ -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) {