Add structured coroutines and explicit error handling
This commit is contained in:
parent
de1262b4cf
commit
fe62e81152
31 changed files with 1701 additions and 325 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue