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
|
|
@ -42,12 +42,13 @@ assert(language.folding?.markers?.start && language.indentationRules?.increaseIn
|
|||
|
||||
const grammarSource = JSON.stringify(grammar);
|
||||
const expectedTokens = [
|
||||
"data", "class", "worker", "private", "override", "val", "var", "if", "else",
|
||||
"while", "for", "in", "select", "return", "go", "defer", "try", "catch",
|
||||
"data", "class", "suspend", "private", "override", "val", "var", "if", "else",
|
||||
"while", "for", "in", "select", "return", "defer", "try", "catch",
|
||||
"throw", "enum", "match", "package", "import", "jsonNaming", "embed", "table", "column", "id",
|
||||
"generated", "Int", "String", "Boolean", "Unit", "Double", "Float", "Any",
|
||||
"ByteSlice", "List", "MutableList", "Map", "MutableMap", "Channel", "GotlinSQLQuery",
|
||||
"generated", "Int", "Long", "String", "Boolean", "Unit", "Double", "Float", "Any",
|
||||
"ByteSlice", "Error", "Result", "List", "MutableList", "Map", "MutableMap", "Channel", "GotlinSQLQuery",
|
||||
"GotlinSQLIterator", "from", "where", "orderBy", "orderByDescending", "limit",
|
||||
"runBlocking", "coroutineScope", "launch", "async", "await", "delay", "withTimeout", "isActive",
|
||||
"forUpdate", "skipLocked", "insert", "update", "delete", "onConflict", "doNothing",
|
||||
"doUpdate", "returning", "build", "fetch", "single", "iterator", "set", "now", "mapTo"
|
||||
];
|
||||
|
|
@ -81,7 +82,7 @@ for (const declaration of [
|
|||
|
||||
const prefixes = new Set(Object.values(snippets).map((snippet) => snippet.prefix));
|
||||
for (const prefix of [
|
||||
"dataclass", "tablerow", "embed", "worker", "enum", "match", "mapto", "go", "defer", "foreach", "sqlfetch",
|
||||
"dataclass", "tablerow", "embed", "coroutinescope", "launch", "async", "enum", "match", "mapto", "safe", "nonnull", "resultfun", "resultmatch", "defer", "foreach", "sqlfetch",
|
||||
"sqlsingle", "sqliterator", "sqlinsertnothing", "sqlinsertupdate", "sqlupdatereturning"
|
||||
]) {
|
||||
assert(prefixes.has(prefix), `snippets are missing prefix ${prefix}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue