We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With
with_stmt := 'with' (var ':=')? expr ':' block
import file.open with f := open("file.txt").append(): for i in 0..100: f.write(str(i))
temp
expr
var
enter
block
leave
A possible desugaring would look like:
temp := <expr> var := temp temp.enter() <block> temp.leave()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Semantics
temp
is createdexpr
is evaluated, and stored intemp
var
binding is createdtemp
is copied tovar
enter
metamethod is called on the value stored intemp
block
is executedleave
metamethod is called on teh value stored intemp
A possible desugaring would look like:
The text was updated successfully, but these errors were encountered: