Add a 'do' keyword #65
Labels
No labels
blocked
blocker
bug
c
codegen
dependencies
discussion
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
javascript
lexer/parser
llvm
macroexpander
performance
priority:high
priority:low
priority:normal
question
triage
typechecker
webassembly
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: samvv/bolt#65
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Problem
I was looking for a good way to introduce new local scopes in Bolt. Currently, Bolt does not support this syntax.
The Solution
Syntactically similar to the
do
keyword in Haskell, this keyword introduces a new indented block. Semantically, it can be viewed as the{ ... }
syntax from Rust, because each item in the block will get evaluated from top to bottom.This solution requires adjustments to the type checker and code generator.
Fixed during latest refactor.