Skip to content

Comments

Added function call support in expressions and statements and updated documentation#7

Merged
byteshiftlabs merged 12 commits intomainfrom
feature/function_calls
Oct 30, 2025
Merged

Added function call support in expressions and statements and updated documentation#7
byteshiftlabs merged 12 commits intomainfrom
feature/function_calls

Conversation

@byteshiftlabs
Copy link
Owner

  • 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)
@byteshiftlabs byteshiftlabs self-assigned this Oct 30, 2025
@byteshiftlabs byteshiftlabs added enhancement New feature or request documentation Improvements or additions to documentation labels Oct 30, 2025
@byteshiftlabs byteshiftlabs changed the title Added function call support in expressions and statements Added function call support in expressions and statements and updated documentation Oct 30, 2025
- 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)
@byteshiftlabs byteshiftlabs requested a review from Copilot October 30, 2025 20:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_CALL AST 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.

Copy link
Contributor

Copilot AI commented Oct 30, 2025

@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.

byteshiftlabs and others added 6 commits October 30, 2025 21:10
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
@byteshiftlabs byteshiftlabs requested a review from Copilot October 30, 2025 20:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

byteshiftlabs and others added 2 commits October 30, 2025 21:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Oct 30, 2025

@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
@byteshiftlabs byteshiftlabs merged commit dad1aeb into main Oct 30, 2025
@byteshiftlabs byteshiftlabs deleted the feature/function_calls branch October 30, 2025 20:48
byteshiftlabs added a commit that referenced this pull request Jan 9, 2026
Added function call support in expressions and statements and updated documentation
byteshiftlabs added a commit that referenced this pull request Jan 9, 2026
Added function call support in expressions and statements and updated documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants