Skip to content

Commit

Permalink
add: snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
lightumcc committed Nov 24, 2023
1 parent 7d6e1ae commit b69476c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cpc-interpreter-extension",
"displayName": "CAIE Pseudocode",
"description": "A VSCode language support extension of CAIE PseudoCode",
"version": "0.1.3",
"version": "0.1.4",
"publisher": "CreatechStudioShanghaiInc",
"icon": "image/icon.png",
"main": "src/extension.ts",
Expand Down
19 changes: 14 additions & 5 deletions src/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"FOR"
],
"body": [
"FOR ${3:element} <- ${1:start} TO ${2:end}",
"FOR ${1:element} <- ${2:start} TO ${3:end}",
"\t$0",
"NEXT $3"
"NEXT $1"
],
"description": "A for loop."
},
Expand All @@ -26,9 +26,9 @@
"FORSTEP"
],
"body": [
"FOR ${4:element} <- ${1:start} TO ${2:end} STEP ${3:step}",
"FOR ${1:element} <- ${2:start} TO ${3:end} STEP ${4:step}",
"\t$0",
"NEXT $4"
"NEXT $1"
],
"description": "A for loop with step."
},
Expand Down Expand Up @@ -107,10 +107,19 @@
"OUTPUT"
],
"body": [
"OUTPUT \"${1:expression}\""
"OUTPUT ${1:expression}"
],
"description": "Output something."
},
"Input": {
"prefix": [
"INPUT"
],
"body": [
"INTPUT ${1:identifier}"
],
"description": "Input something."
},
"Call": {
"prefix":[
"CALL"
Expand Down

0 comments on commit b69476c

Please sign in to comment.