Skip to content

Commit e03541d

Browse files
committed
doc: add language hint for markdown
1 parent 6cc039c commit e03541d

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "go",
1010
"request": "launch",
1111
"mode": "exec",
12-
"asRoot": true,
12+
"asRoot": false,
1313
"program": "output/cell",
1414
"console": "integratedTerminal",
1515
"args": ["${workspaceFolder}/hi.cell"],

SYNTAX.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Look at the following code, to understand it better:
2424

2525
### Example
2626

27-
```solidity
27+
```cellscript
2828
package main
2929
import "debug"
3030
@@ -49,7 +49,7 @@ CellScript supports single-line or multi-line comments.
4949

5050
### Single-line Comments
5151

52-
```
52+
```cellscript
5353
// This is a comment
5454
package main
5555
import ("fmt")
@@ -94,19 +94,19 @@ Variable naming rules:
9494

9595
#### `var` keyword
9696

97-
```
97+
```cellscript
9898
var variablename type = value
9999
```
100100

101101
#### `:=` sign
102102

103-
```
103+
```cellscript
104104
variablename := value
105105
```
106106

107107
#### Variable Declaration With Initial Value
108108

109-
```
109+
```cellscript
110110
package main
111111
import ("fmt")
112112
@@ -125,7 +125,7 @@ func main() {
125125

126126
In Go, all variables are initialized. So, if you declare a variable without an initial value, its value will be set to the default value of its type:
127127

128-
```
128+
```cellscript
129129
package main
130130
import ("fmt")
131131
@@ -150,7 +150,7 @@ The `const` keyword declares the variable as "constant", which means that it is
150150

151151
### Declaring a Constant
152152

153-
```
153+
```cellscript
154154
package main
155155
import ("fmt")
156156
@@ -168,7 +168,7 @@ There are three functions to output text:
168168
* `Println()`
169169
* `Printf()`
170170

171-
```
171+
```cellscript
172172
package main
173173
import ("debug")
174174
@@ -184,7 +184,7 @@ function main() {
184184

185185
Arrays are used to store multiple values of the same type in a single variable, instead of declaring separate variables for each value.
186186

187-
```
187+
```cellscript
188188
var array_name = [length]datatype{values} // here length is defined
189189
array_name := [length]datatype{values} // here length is defined
190190
```
@@ -193,7 +193,7 @@ array_name := [length]datatype{values} // here length is defined
193193

194194
An vector is a numbered sequence of elements of a single type, called the element type. The number of elements is called the length of the vector and is never negative.
195195

196-
```
196+
```cellscript
197197
vector_name := []datatype{values}
198198
```
199199

@@ -232,7 +232,7 @@ To create (often referred to as declare) a function, do the following:
232232
* Specify a name for the function, followed by parentheses ().
233233
* Finally, add code that defines what the function should do, inside curly braces {}.
234234

235-
```
235+
```cellscript
236236
function FunctionName() {
237237
// code to be executed
238238
}
@@ -242,7 +242,7 @@ function FunctionName() {
242242

243243
Functions are not executed immediately. They are "saved for later use", and will be executed when they are called.
244244

245-
```
245+
```cellscript
246246
package main
247247
import ("debug")
248248
@@ -263,15 +263,15 @@ Each execution of a loop is called an **iteration** .
263263

264264
The `for` loop can take up to three statements:
265265

266-
```
266+
```cellscript
267267
for statement1; statement2; statement3 {
268268
// code to be executed for each iteration
269269
}
270270
```
271271

272272
Example
273273

274-
```
274+
```cellscript
275275
package main
276276
import ("fmt")
277277
@@ -288,7 +288,7 @@ A table is a sequence of named elements, called fields, each of which has a name
288288

289289
To declare a structure in CellScript, use the `type` and `struct` keywords:
290290

291-
```
291+
```cellscript
292292
type struct_name struct {
293293
member1 datatype;
294294
member2 datatype;
@@ -299,7 +299,7 @@ type struct_name struct {
299299

300300
Example
301301

302-
```
302+
```cellscript
303303
type Person struct {
304304
name string
305305
age int

0 commit comments

Comments
 (0)