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

Closed
wants to merge 57 commits into from

Conversation

himaanisrivatsava
Copy link

@himaanisrivatsava himaanisrivatsava commented Jan 13, 2025

Summary

Related Issue

Closes #194

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 20 commits January 5, 2025 12:34
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
Copy link

github-actions bot commented Feb 8, 2025

This pull request has been marked as stale because it has been inactive for more than 14 days. Please update this pull request or it will be automatically closed in 7 days.

@github-actions github-actions bot added the stale label Feb 8, 2025
Copy link

This pull request has been automatically closed because it has been inactive for more than 14 days. Please reopen if you still intend to submit this pull request.

@github-actions github-actions bot closed this Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#define pre processor
1 participant