Repository navigation
Conversation
src/flow/overload.py: allow string to match ptr<i8> parameters in overload resolution. Flow string lowers to C char*, so string literals need to resolve to mangled function names when passed to ptr<i8> parameters. compiler/src/test_parser.flow: self-test for the existing self-hosted parser. Verifies AST node counts (2 functions, 2 params, 1 let, 3 returns, 1 if, 1 call, 2 binops, 4 ints, 4 idents, 3 blocks) for a sample program. The self-hosted compiler at compiler/src/ (~9600 lines) already has a working lexer, parser, type checker, C generator, JS generator, formatter, and module resolver. It passes its own test suite. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/flow/overload.py: allowstringto matchptr<i8>in overload resolution. Flowstringlowers to Cchar*, so string literals must resolve to mangled names when passed toptr<i8>parameters.compiler/src/test_parser.flow: self-test for the existing self-hosted parser. Verifies AST node counts for a sample program with 2 functions.Context
The self-hosted compiler at
compiler/src/(~9600 lines) already has a working lexer, parser, type checker, C generator, JS generator, formatter, and module resolver. It passes its own test suite (flowc: PASS).Test plan
./flow run compiler/src/main.flowpasses (flowc: PASS)./flow run compiler/src/test_parser.flowpasses (test_parser: PASS)This pull request includes code written with the assistance of AI.
The code has not yet been reviewed by a human.
Generated with Devin