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
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue