Skip to content

Commit

Permalink
update docs for spx APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
nighca committed Jan 14, 2025
1 parent 1ee2b57 commit 67585f6
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 121 deletions.
12 changes: 6 additions & 6 deletions spx-gui/src/components/editor/code-editor/document-base/gop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const forIterate: DefinitionDocumentationItem = {
kind: DefinitionKind.Statement,
definition: { name: 'for_iterate' }, // TODO
insertText: 'for ${1:i}, ${2:v} <- ${3:set} {\n\t${4:}\n}',
overview: 'for i, v <- set { ... }',
overview: 'for i, v <- set {}',
detail: makeBasicMarkdownString({
en: 'Iterate within given set',
zh: '遍历指定集合'
Expand All @@ -19,7 +19,7 @@ export const forLoopWithCondition: DefinitionDocumentationItem = {
kind: DefinitionKind.Statement,
definition: { name: 'for_loop_with_condition' }, // TODO
insertText: 'for ${1:condition} {\n\t${2:}\n}',
overview: 'for condition { ... }',
overview: 'for condition {}',
detail: makeBasicMarkdownString({
en: 'Loop with condition',
zh: '条件循环'
Expand All @@ -31,7 +31,7 @@ export const forLoopWithRange: DefinitionDocumentationItem = {
kind: DefinitionKind.Statement,
definition: { name: 'for_loop_with_range' }, // TODO
insertText: 'for ${1:i} <- ${2:start}:${3:end} {\n\t${4:}\n}',
overview: 'for i <- start:end { ... }',
overview: 'for i <- start:end {}',
detail: makeBasicMarkdownString({
en: 'Loop with range',
zh: '指定范围循环'
Expand All @@ -43,7 +43,7 @@ export const ifStatement: DefinitionDocumentationItem = {
kind: DefinitionKind.Statement,
definition: { name: 'if_statement' }, // TODO
insertText: 'if ${1:condition} {\n\t${2:}\n}',
overview: 'if condition { ... }',
overview: 'if condition {}',
detail: makeBasicMarkdownString({
en: 'If statement',
zh: '条件语句'
Expand All @@ -55,7 +55,7 @@ export const ifElseStatement: DefinitionDocumentationItem = {
kind: DefinitionKind.Statement,
definition: { name: 'if_else_statement' }, // TODO
insertText: 'if ${1:condition} {\n\t${2:}\n} else {\n\t${3:}\n}',
overview: 'if condition { ... } else { ... }',
overview: 'if condition {} else {}',
detail: makeBasicMarkdownString({
en: 'If else statement',
zh: '条件否则语句'
Expand All @@ -79,7 +79,7 @@ export const functionDeclaration: DefinitionDocumentationItem = {
kind: DefinitionKind.Statement,
definition: { name: 'func_declaration' }, // TODO
insertText: 'func ${1:name}(${2:params}) ${3:returnType} {\n\t${4}\n}',
overview: 'func name(params) { ... }',
overview: 'func name(params) {}',
detail: makeBasicMarkdownString({
en: 'Function declaration, e.g., `func add(a int, b int) int {}`',
zh: '函数定义,如 `func add(a int, b int) int {}`'
Expand Down
Loading

0 comments on commit 67585f6

Please sign in to comment.