Repository navigation
Conversation
compiler/src/token.flow: add KW_EFFECT (28) and KW_CAPABILITY (29).
compiler/src/lexer.flow: add "effect" and "capability" keywords.
compiler/src/parser.flow:
- Skip effect Name { ... } and capability Name { ... } blocks at
top level and after export. Uses new flowc_parser_skip_brace_block
helper.
- Add call parsing to flowc_parse_postfix. This handles method-style
calls like Foo.bar(42) and chained calls like obj.method()(args).
The call name span is copied from the base expression for cgen.
lib/stdlib/async.flow now parses and emits C (previously failed on
export effect blocks and Foo.bar() calls).
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
effect Name { ... }andcapability Name { ... }blocks are now skipped at top level and afterexport. Uses a newflowc_parser_skip_brace_blockhelper.flowc_parse_postfix. This handles method-style calls likeFoo.bar(42)and chained calls.Context
async.flowusesexport effect Async { ... }andexport capability SimulatedAsync { ... }for algebraic effect declarations. It also calls effect members likeAsync.delay(ms), which requires postfix call parsing on field-access expressions.Test plan
./flow run compiler/src/main.flowpasses (flowc: PASS)lib/stdlib/async.flowparses and emits C (remaining C errors are missing extern declarations forflow_tcp_*functions, not compiler bugs)Foo.bar(42)parses correctlyThis pull request includes code written with the assistance of AI.
The code has not yet been reviewed by a human.
Generated with Devin