Skip to content

Commit b0c21fc

Browse files
committed
More docs
1 parent 2a9d059 commit b0c21fc

File tree

5 files changed

+307
-87
lines changed

5 files changed

+307
-87
lines changed

docs/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"activeMatch": "/guide/"
66
},
77
{
8-
"text": "Std library",
8+
"text": "Std Library",
99
"link": "/std-library/",
1010
"activeMatch": "/std-library/"
1111
},

docs/reference/cli.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
**aim** (AiScript Manager) is a command-line tool for AiScript. Similar [cargo](https://github.com/rust-lang/cargo) for Rust. It provides a set of commands to help you build web applications quickly.
2+
**aim** (AIScript Manager) is a command-line tool for AIScript. Similar [cargo](https://github.com/rust-lang/cargo) for Rust. It provides a set of commands to help you build web applications quickly.
33

44
## ai
55

6-
`aim ai` is a command to generate AI apps built in AiScript from a prompt.
6+
`aim ai` is a command to generate AI apps built in AIScript from a prompt.
77

88
```
99
$ cat prompts.txt
@@ -22,7 +22,7 @@ $ aim ai prompts.txt
2222

2323
## deploy
2424

25-
Deploy the AiScript project to the aiscript.dev server.
25+
Deploy the AIScript project to the aiscript.dev server.
2626

2727
```
2828
$ aim deploy
@@ -63,14 +63,14 @@ Generate mock data.
6363

6464
## new
6565

66-
Create a new AiScript project.
66+
Create a new AIScript project.
6767

6868
## test
6969

7070
## server
7171

72-
Run the AiScript project as a web server.
72+
Run the AIScript project as a web server.
7373

7474
## version
7575

76-
Show the version of AiScript.
76+
Show the version of AIScript.

docs/reference/language-keyword.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ai fn sentiment(text: str) -> float {
1111
prompt "Analyze the sentiment of the following text: {text}";
1212
}
1313

14-
let value = sentiment("I love AiScript")
14+
let value = sentiment("I love AIScript")
1515
print(value) # 0.9
1616
```
1717

@@ -164,7 +164,7 @@ for number in numbers {
164164
}
165165

166166
let person = {
167-
"name": "AiScript",
167+
"name": "AIScript",
168168
};
169169
print("name" in person); # true
170170
print("age" in person); # false
@@ -177,16 +177,16 @@ print(0 in numbers); # false
177177
`let` is used to declare a variable.
178178

179179
```rs
180-
let name = "AiScript";
180+
let name = "AIScript";
181181
```
182182

183183
### match
184184

185185
```rs
186-
let language = "AiScript";
186+
let language = "AIScript";
187187

188188
match language {
189-
"AiScript" => print("AiScript"),
189+
"AIScript" => print("AIScript"),
190190
"Rust" => print("Rust"),
191191
"Python" => print("Python"),
192192
"JavaScript" => print("JavaScript"),
@@ -196,7 +196,7 @@ match language {
196196

197197
### not
198198

199-
`not` is a unary operator that returns the opposite of its operand. In other languages, it often use the `!` symbol, but in AiScript, we use the `not` keyword.
199+
`not` is a unary operator that returns the opposite of its operand. In other languages, it often use the `!` symbol, but in AIScript, we use the `not` keyword.
200200

201201
```
202202
print(not true); # false

docs/reference/language-syntax.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## Comments
1414

15-
AiScript use `//` as the comment symbol.
15+
AIScript use `//` as the comment symbol.
1616

1717
```py
1818
// This is a comment
@@ -33,7 +33,7 @@ Every comment on route will be generated to the OpenAPI documentation.
3333
## Variables
3434

3535
```rs
36-
let name = "AiScript";
36+
let name = "AIScript";
3737
let age = 18;
3838
```
3939

@@ -58,7 +58,7 @@ get /hello {
5858
let nil_value = nil;
5959

6060
// strings
61-
let name = "AiScript";
61+
let name = "AIScript";
6262

6363
// integers
6464
let age = 18;
@@ -80,7 +80,7 @@ let numbers = [1, 2, 3, 4, 5];
8080

8181
// maps
8282
let person = {
83-
"name": "AiScript",
83+
"name": "AIScript",
8484
"age": 18,
8585
"is_male": true,
8686
"hobbies": ["reading", "coding", "gaming"],
@@ -94,7 +94,7 @@ let person = {
9494
};
9595

9696
// tuples
97-
let person = ("AiScript", 18, true);
97+
let person = ("AIScript", 18, true);
9898

9999
```
100100

@@ -146,19 +146,19 @@ let b = 1 not in [1, 2, 3];
146146

147147
```rs
148148
// string interpolation
149-
let a = "AiScript";
149+
let a = "AIScript";
150150
let b = "Hello, {a}!";
151151

152152
// string concatenation
153-
let a = "AiScript";
153+
let a = "AIScript";
154154
let b = "Hello, " + a + "!";
155155

156156
// string format
157-
let a = "AiScript";
157+
let a = "AIScript";
158158
let b = "Hello, {a}!";
159159

160160
// string length
161-
let a = "AiScript";
161+
let a = "AIScript";
162162
let b = a.len();
163163

164164
```
@@ -174,7 +174,7 @@ let d = a[:3]; // [1, 2, 3]
174174

175175
// string slice
176176
// string slice
177-
let a = "AiScript";
177+
let a = "AIScript";
178178
let b = a[0:3]; // "Web"
179179
let c = a[3:]; // "Script"
180180
let d = a[:3]; // "Web"
@@ -200,10 +200,10 @@ if age > 60 {
200200
## Match
201201

202202
```rs
203-
let language = "AiScript";
203+
let language = "AIScript";
204204

205205
match language {
206-
"AiScript" => print("AiScript"),
206+
"AIScript" => print("AIScript"),
207207
"Rust" => print("Rust"),
208208
"Python" => print("Python"),
209209
"JavaScript" => print("JavaScript"),
@@ -237,7 +237,7 @@ print(add5(10)); // 15
237237

238238
## Loops
239239

240-
AiScript only has one keyword for loops, the `for` keyword. You can use it to iterate over a list, a map, or a range. You can also use it achieve unconditional loops and `do while` loops.
240+
AIScript only has one keyword for loops, the `for` keyword. You can use it to iterate over a list, a map, or a range. You can also use it achieve unconditional loops and `do while` loops.
241241

242242
### Iterate over a list
243243

@@ -253,7 +253,7 @@ for number in numbers {
253253

254254
```rs
255255
let person = {
256-
"name": "AiScript",
256+
"name": "AIScript",
257257
"age": 18,
258258
"gender": "male",
259259
};

0 commit comments

Comments
 (0)