Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#194 define Preprocessor #262

Open
wants to merge 57 commits into
base: main
Choose a base branch
from

Conversation

himaanisrivatsava
Copy link

@himaanisrivatsava himaanisrivatsava commented Jan 13, 2025

Summary

Related Issue

Changes

Shader Sample (Optional)

Testing

Checklist

feat: Add DirectX preprocessor for handling #define, #ifdef, #include, and related directives

refactor: Integrate preprocessor into DirectX lexer

refactor: Update DirectX backend init to include preprocessing pipeline

test: Add tests for DirectX preprocessor functionality

fix: Improve error handling for invalid directives in preprocessor

  • Tests cover new or changed code (or reason why not)
  • Linked the issue with a closing keyword (if applicable)
  • Only touched files related to the issue
  • Everything builds and runs locally

himaanisrivatsava and others added 30 commits January 5, 2025 14:29
feat: Add DirectX preprocessor for handling #define, #ifdef, #include, and related directives

refactor: Integrate preprocessor into DirectX lexer

refactor: Update DirectX backend init to include preprocessing pipeline

test: Add tests for DirectX preprocessor functionality

fix: Improve error handling for invalid directives in preprocessor
Fix: importing HLSLLexer from crossGL backend
fix: rewrote the preprocessor test using pytest instead of Unittest
pre-commit-ci bot and others added 23 commits January 5, 2025 12:19
Mocking os.path.exists: I added the @patch("os.path.exists", return_value=True) decorator to mock os.path.exists for all the test methods that deal with file inclusion. This ensures that file existence checks return True during tests.

Raising ValueError for Undefined Macros: I updated the expand_macros method to raise a ValueError when undefined macros are encountered.
corrected all the errors in the test_preprocessor.py module
pre-commit-ci bot and others added 4 commits January 13, 2025 17:30
another rupdate after all the tests were passed yet somwhow 18 backend test cases failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant