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

@ -20,6 +20,7 @@ const (
tokenEnum tokenKind = "ENUM"
tokenMatch tokenKind = "MATCH"
tokenFun tokenKind = "FUN"
tokenSuspend tokenKind = "SUSPEND"
tokenOverride tokenKind = "OVERRIDE"
tokenPrivate tokenKind = "PRIVATE"
tokenVal tokenKind = "VAL"
@ -65,17 +66,19 @@ const (
tokenAmp tokenKind = "&"
tokenAt tokenKind = "@"
tokenQuestion tokenKind = "?"
tokenSafeDot tokenKind = "?."
tokenDoubleBang tokenKind = "!!"
tokenOr tokenKind = "||"
tokenArrow tokenKind = "->"
)
var keywords = map[string]tokenKind{
"fun": tokenFun,
"suspend": tokenSuspend,
"import": tokenImport,
"package": tokenPackage,
"class": tokenClass,
"data": tokenData,
"worker": tokenWorker,
"interface": tokenInterface,
"enum": tokenEnum,
"match": tokenMatch,
@ -90,7 +93,6 @@ var keywords = map[string]tokenKind{
"in": tokenIn,
"select": tokenSelect,
"return": tokenReturn,
"go": tokenGo,
"defer": tokenDefer,
"try": tokenTry,
"catch": tokenCatch,