Add structured coroutines and explicit error handling

This commit is contained in:
pavel 2026-08-27 16:26:40 +02:00
commit fe62e81152
31 changed files with 1701 additions and 325 deletions

View file

@ -71,6 +71,7 @@ type FunctionSignature struct {
Name string
Params []Param
ReturnType string
Suspend bool
}
type FunctionDecl struct {
@ -78,6 +79,7 @@ type FunctionDecl struct {
Params []Param
ReturnType string
Body []Stmt
Suspend bool
}
type Param struct {
@ -290,6 +292,21 @@ type SelectorExpr struct {
func (SelectorExpr) exprNode() {}
type SafeSelectorExpr struct {
Receiver Expr
Name string
}
func (SafeSelectorExpr) exprNode() {}
type NonNullExpr struct{ Value Expr }
func (NonNullExpr) exprNode() {}
type TryExpr struct{ Value Expr }
func (TryExpr) exprNode() {}
type IndexExpr struct {
Receiver Expr
Index Expr