Added function call support in expressions and statements and updated documentation#7
Conversation
byteshiftlabs
commented
Oct 30, 2025
- Added NODE_FUNC_CALL to AST node types
- Parser handles calls in expressions, assignments, conditions, loops, and standalone statements
- VHDL codegen emits function call syntax
- Added comprehensive test file with 7 scenarios
- All tests passing (8/8)
- Added NODE_FUNC_CALL to AST node types - Parser handles calls in expressions, assignments, conditions, loops, and standalone statements - VHDL codegen emits function call syntax - Added comprehensive test file with 7 scenarios - All tests passing (8/8)
- Implemented NODE_FUNC_CALL for parsing function calls in all contexts - Parser handles calls in expressions, statements, conditions, and nested - VHDL generation emits function call syntax (basic implementation) - Added examples/function_calls.c with test scenarios - Updated README and docs to reflect new functionality - All existing tests pass (8/8)
There was a problem hiding this comment.
Pull Request Overview
This PR adds function call support to the parser and code generator. The implementation allows function calls to be used in expressions, standalone statements, conditions, and nested contexts.
Key Changes:
- Added
NODE_FUNC_CALLAST node type for representing function calls - Implemented parsing for function calls in both expression and statement contexts
- Added VHDL code generation for function calls (basic implementation)
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
include/astnode.h |
Added NODE_FUNC_CALL enum value to node types |
src/parser/parse_expression.c |
Added parse_function_call() to handle function calls in expressions |
src/parser/parse_statement.c |
Added parse_standalone_function_call() for standalone function call statements |
src/codegen/codegen_vhdl.c |
Added gen_func_call() to generate VHDL for function calls |
tests/basic_tests.cpp |
Added comprehensive test suite for function call scenarios |
examples/function_calls.c |
Added example file demonstrating various function call patterns |
docs/source/internals/parser.rst |
Added documentation for function call parsing with examples |
docs/source/known_issues.rst |
Updated known issues to reflect function call implementation status |
README.md |
Updated feature list to include function call support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@cmelnu I've opened a new pull request, #8, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: cmelnu <35693456+cmelnu@users.noreply.github.com>
Co-authored-by: cmelnu <35693456+cmelnu@users.noreply.github.com>
Co-authored-by: cmelnu <35693456+cmelnu@users.noreply.github.com>
Co-authored-by: cmelnu <35693456+cmelnu@users.noreply.github.com>
Refactor: Extract shared function call argument parsing logic
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@cmelnu I've opened a new pull request, #9, to work on those changes. Once the pull request is ready, I'll request review from you. |
Update documentation to reflect refactored parse_standalone_function_call implementation
Added function call support in expressions and statements and updated documentation
Added function call support in expressions and statements and updated documentation