Skip to content

Commit 53f59e4

Browse files
committed
Add why aiscript to nav bar
1 parent fcbd01f commit 53f59e4

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

docs/_meta.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@
1313
"text": "Std Library",
1414
"link": "/std/overview",
1515
"activeMatch": "/std/"
16+
},
17+
{
18+
"text": "Why AIScript",
19+
"link": "/guide/getting-started/why-aiscript",
20+
"activeMatch": "/guide/getting-started/why-aiscript"
1621
}
1722
]

docs/guide/language/basic.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,12 @@ for let i = 0; i < 10; i += 1 {
351351
// 7
352352
// i == 9
353353
```
354+
355+
## Environment
356+
357+
AIScript provide a convenient way to access environment variables, the syntax is `$ENV_NAME`. You can also use [std.env](/std/env) module too.
358+
359+
```rust
360+
let home = $HOME;
361+
print(home);
362+
```

docs/guide/language/class-object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ let developer = Employee("Carlos", 28, "Software Developer");
146146
developer.greet(); // "Hello, my name is Carlos and I'm 28 years old, a Software Developer"
147147
```
148148

149-
:::danger
149+
:::danger Notice
150150
AIScript only support inherit single super class.
151151
:::
152152

docs/guide/language/closure-lambda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ fetch_data(
179179
);
180180
```
181181

182-
:::danger
182+
:::danger Notice
183183
AIScript current doesn't support `fn` as type annotation.
184184
```rs
185185
fn fetch_data(url: str, on_success: fn(data: str), on_error: fn(error: str)) {}

0 commit comments

Comments
 (0)