Skip to content

Commit cfc75fd

Browse files
committed
📝 docs: fix .nexa → .nx file extension across all docs
1 parent 27dc78d commit cfc75fd

8 files changed

Lines changed: 70 additions & 70 deletions

docs/error_index.en.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Compile-time errors are detected during the code compilation phase, indicating s
2525
**Error Message**:
2626
```
2727
Error E001: Undeclared identifier 'X'
28-
--> main.nexa:15:5
28+
--> main.nx:15:5
2929
|
3030
15 | result = UnknownAgent.run(input);
3131
| ^^^^^^^^^^^^^ 'UnknownAgent' not found
@@ -58,7 +58,7 @@ result = WeatherBot.run(input);
5858
**Error Message**:
5959
```
6060
Error E002: Type mismatch
61-
--> main.nexa:23:20
61+
--> main.nx:23:20
6262
|
6363
23 | protocol Report { score: "number" }
6464
| ^^^^^ expected 'number', found 'string'
@@ -89,7 +89,7 @@ protocol Report {
8989
**Error Message**:
9090
```
9191
Error E003: Missing required property 'role'
92-
--> main.nexa:10:1
92+
--> main.nx:10:1
9393
|
9494
10 | agent MyAgent {
9595
| ^^^^^^^^^^^^^ 'role' property is required
@@ -122,7 +122,7 @@ agent MyAgent {
122122
**Error Message**:
123123
```
124124
Error E004: Syntax error
125-
--> main.nexa:5:1
125+
--> main.nx:5:1
126126
|
127127
5 | agent { }
128128
| ^^^^^^^^ Expected IDENTIFIER after 'agent'
@@ -142,7 +142,7 @@ Error E004: Syntax error
142142
**Error Message**:
143143
```
144144
Error E005: Duplicate declaration 'MyAgent'
145-
--> main.nexa:20:1
145+
--> main.nx:20:1
146146
|
147147
20 | agent MyAgent { ... }
148148
| ^^^^^^^^^^^^^ 'MyAgent' already declared
@@ -250,7 +250,7 @@ match user_input {
250250
**Error Message**:
251251
```
252252
ContractViolation(requires:deterministic, message="amount must be positive")
253-
--> transfer.nexa:5
253+
--> transfer.nx:5
254254
```
255255

256256
**Cause**:
@@ -285,7 +285,7 @@ flow review(code: string) -> Report
285285
**Error Message**:
286286
```
287287
ContractViolation(ensures:semantic, message="result must include actionable feedback")
288-
--> review.nexa:8
288+
--> review.nx:8
289289
```
290290

291291
**Cause**:
@@ -317,7 +317,7 @@ ContractViolation(invariant:deterministic, message="state must be idle or runnin
317317
**Error Message**:
318318
```
319319
TypeViolation: Expected Int, got String
320-
--> main.nexa:10
320+
--> main.nx:10
321321
|
322322
10 | let x: Int = "hello"
323323
| ^^^^^^^ Type mismatch
@@ -344,7 +344,7 @@ let y: String = "hello" // ✅ Correct
344344
**Error Message**:
345345
```
346346
TypeWarning: Expected Int, got String (mode: warn)
347-
--> main.nexa:10
347+
--> main.nx:10
348348
```
349349

350350
**Cause**:

docs/error_index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ comments: true
2525
**错误信息**
2626
```
2727
Error E001: Undeclared identifier 'X'
28-
--> main.nexa:15:5
28+
--> main.nx:15:5
2929
|
3030
15 | result = UnknownAgent.run(input);
3131
| ^^^^^^^^^^^^^ 'UnknownAgent' not found
@@ -58,7 +58,7 @@ result = WeatherBot.run(input);
5858
**错误信息**
5959
```
6060
Error E002: Type mismatch
61-
--> main.nexa:23:20
61+
--> main.nx:23:20
6262
|
6363
23 | protocol Report { score: "number" }
6464
| ^^^^^ expected 'number', found 'string'
@@ -89,7 +89,7 @@ protocol Report {
8989
**错误信息**
9090
```
9191
Error E003: Missing required property 'role'
92-
--> main.nexa:10:1
92+
--> main.nx:10:1
9393
|
9494
10 | agent MyAgent {
9595
| ^^^^^^^^^^^^^ 'role' property is required
@@ -122,7 +122,7 @@ agent MyAgent {
122122
**错误信息**
123123
```
124124
Error E004: Syntax error
125-
--> main.nexa:5:1
125+
--> main.nx:5:1
126126
|
127127
5 | agent { }
128128
| ^^^^^^^^ Expected IDENTIFIER after 'agent'
@@ -142,7 +142,7 @@ Error E004: Syntax error
142142
**错误信息**
143143
```
144144
Error E005: Duplicate declaration 'MyAgent'
145-
--> main.nexa:20:1
145+
--> main.nx:20:1
146146
|
147147
20 | agent MyAgent { ... }
148148
| ^^^^^^^^^^^^^ 'MyAgent' already declared
@@ -250,7 +250,7 @@ match user_input {
250250
**错误信息**
251251
```
252252
ContractViolation(requires:deterministic, message="amount must be positive")
253-
--> transfer.nexa:5
253+
--> transfer.nx:5
254254
```
255255

256256
**原因**
@@ -285,7 +285,7 @@ flow review(code: string) -> Report
285285
**错误信息**
286286
```
287287
ContractViolation(ensures:semantic, message="result must include actionable feedback")
288-
--> review.nexa:8
288+
--> review.nx:8
289289
```
290290

291291
**原因**
@@ -317,7 +317,7 @@ ContractViolation(invariant:deterministic, message="state must be idle or runnin
317317
**错误信息**
318318
```
319319
TypeViolation: Expected Int, got String
320-
--> main.nexa:10
320+
--> main.nx:10
321321
|
322322
10 | let x: Int = "hello"
323323
| ^^^^^^^ Type mismatch
@@ -344,7 +344,7 @@ let y: String = "hello" // ✅ 正确
344344
**错误信息**
345345
```
346346
TypeWarning: Expected Int, got String (mode: warn)
347-
--> main.nexa:10
347+
--> main.nx:10
348348
```
349349

350350
**原因**

docs/part3_extensions.en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,10 @@ Control type annotation coverage checking via `NEXA_LINT_MODE` or `nexa lint --w
726726

727727
```bash
728728
# Check type annotation coverage
729-
nexa lint main.nexa --warn-untyped
729+
nexa lint main.nx --warn-untyped
730730

731731
# Strict lint mode
732-
nexa lint main.nexa --strict
732+
nexa lint main.nx --strict
733733
```
734734

735735
### Type Expressions

docs/part3_extensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,10 @@ export NEXA_TYPE_MODE=forgiving # 宽容模式
726726

727727
```bash
728728
# 检查类型标注覆盖率
729-
nexa lint main.nexa --warn-untyped
729+
nexa lint main.nx --warn-untyped
730730

731731
# 严格 lint 模式
732-
nexa lint main.nexa --strict
732+
nexa lint main.nx --strict
733733
```
734734

735735
### 类型表达式

docs/part5_enterprise.en.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ server MyApp {
3535

3636
```bash
3737
# Start HTTP Server
38-
nexa serve main.nexa
38+
nexa serve main.nx
3939

4040
# Specify port
41-
nexa serve main.nexa --port 8080
41+
nexa serve main.nx --port 8080
4242
```
4343

4444
### Viewing Routes
4545

4646
```bash
4747
# List all routes
48-
nexa routes main.nexa
48+
nexa routes main.nx
4949

5050
# JSON format output
51-
nexa routes main.nexa --json
51+
nexa routes main.nx --json
5252
```
5353

5454
### Contract and HTTP Status Code Mapping
@@ -603,32 +603,32 @@ job SendEmail {
603603

604604
```bash
605605
# View all jobs
606-
nexa jobs main.nexa --all
606+
nexa jobs main.nx --all
607607

608608
# View jobs with specific status
609-
nexa jobs main.nexa --status failed
609+
nexa jobs main.nx --status failed
610610

611611
# View dead letter queue
612-
nexa jobs main.nexa --dead-letter
612+
nexa jobs main.nx --dead-letter
613613

614614
# Clear completed jobs
615-
nexa jobs main.nexa --clear-completed
615+
nexa jobs main.nx --clear-completed
616616

617617
# Retry dead letter job
618-
nexa jobs main.nexa --retry <job_id>
618+
nexa jobs main.nx --retry <job_id>
619619
```
620620

621621
### Worker Management CLI
622622

623623
```bash
624624
# View worker status
625-
nexa workers main.nexa
625+
nexa workers main.nx
626626

627627
# Add extra workers
628-
nexa workers main.nexa --add 2
628+
nexa workers main.nx --add 2
629629

630630
# Stop worker
631-
nexa workers main.nexa --stop <worker_id>
631+
nexa workers main.nx --stop <worker_id>
632632
```
633633

634634
### Complete Example: Async Email System

docs/part5_enterprise.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ server MyApp {
3535

3636
```bash
3737
# 启动 HTTP Server
38-
nexa serve main.nexa
38+
nexa serve main.nx
3939

4040
# 指定端口
41-
nexa serve main.nexa --port 8080
41+
nexa serve main.nx --port 8080
4242
```
4343

4444
### 查看路由
4545

4646
```bash
4747
# 列出所有路由
48-
nexa routes main.nexa
48+
nexa routes main.nx
4949

5050
# JSON 格式输出
51-
nexa routes main.nexa --json
51+
nexa routes main.nx --json
5252
```
5353

5454
### 契约与 HTTP 状态码映射
@@ -603,32 +603,32 @@ job SendEmail {
603603

604604
```bash
605605
# 查看所有任务
606-
nexa jobs main.nexa --all
606+
nexa jobs main.nx --all
607607

608608
# 查看特定状态的任务
609-
nexa jobs main.nexa --status failed
609+
nexa jobs main.nx --status failed
610610

611611
# 查看死信队列
612-
nexa jobs main.nexa --dead-letter
612+
nexa jobs main.nx --dead-letter
613613

614614
# 清理已完成任务
615-
nexa jobs main.nexa --clear-completed
615+
nexa jobs main.nx --clear-completed
616616

617617
# 重试死信任务
618-
nexa jobs main.nexa --retry <job_id>
618+
nexa jobs main.nx --retry <job_id>
619619
```
620620

621621
### Worker 管理 CLI
622622

623623
```bash
624624
# 查看 Worker 状态
625-
nexa workers main.nexa
625+
nexa workers main.nx
626626

627627
# 启动额外 Worker
628-
nexa workers main.nexa --add 2
628+
nexa workers main.nx --add 2
629629

630630
# 停止 Worker
631-
nexa workers main.nexa --stop <worker_id>
631+
nexa workers main.nx --stop <worker_id>
632632
```
633633

634634
### 完整示例:异步邮件系统

docs/quickstart.en.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,22 @@ nexa --version
5959

6060
```bash
6161
# Build and run
62-
nexa build main.nexa # Compile program
63-
nexa run main.nexa # Run program
64-
nexa test main.nexa # Run tests
62+
nexa build main.nx # Compile program
63+
nexa run main.nx # Run program
64+
nexa test main.nx # Run tests
6565

6666
# Analysis and checking
67-
nexa inspect main.nexa # Structural analysis
68-
nexa validate main.nexa # Semantic validation
69-
nexa lint main.nexa # Type system lint (v1.3.1+)
70-
nexa intent check main.nexa # Intent check (v1.1+)
71-
nexa intent coverage main.nexa # Intent coverage (v1.1+)
67+
nexa inspect main.nx # Structural analysis
68+
nexa validate main.nx # Semantic validation
69+
nexa lint main.nx # Type system lint (v1.3.1+)
70+
nexa intent check main.nx # Intent check (v1.1+)
71+
nexa intent coverage main.nx # Intent coverage (v1.1+)
7272

7373
# Service and jobs
74-
nexa serve main.nexa # Start HTTP Server (v1.3.4+)
75-
nexa routes main.nexa # List routes (v1.3.4+)
76-
nexa jobs main.nexa --all # Job management (v1.3.3+)
77-
nexa workers main.nexa # Worker management (v1.3.3+)
74+
nexa serve main.nx # Start HTTP Server (v1.3.4+)
75+
nexa routes main.nx # List routes (v1.3.4+)
76+
nexa jobs main.nx --all # Job management (v1.3.3+)
77+
nexa workers main.nx # Worker management (v1.3.3+)
7878
nexa cache clear # Clear cache
7979
```
8080

docs/quickstart.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,22 @@ nexa --version
5959

6060
```bash
6161
# 编译与运行
62-
nexa build main.nexa # 编译程序
63-
nexa run main.nexa # 运行程序
64-
nexa test main.nexa # 运行测试
62+
nexa build main.nx # 编译程序
63+
nexa run main.nx # 运行程序
64+
nexa test main.nx # 运行测试
6565

6666
# 分析与检查
67-
nexa inspect main.nexa # 结构分析
68-
nexa validate main.nexa # 语义验证
69-
nexa lint main.nexa # 类型系统 Lint (v1.3.1+)
70-
nexa intent check main.nexa # 意图检查 (v1.1+)
71-
nexa intent coverage main.nexa # 意图覆盖率 (v1.1+)
67+
nexa inspect main.nx # 结构分析
68+
nexa validate main.nx # 语义验证
69+
nexa lint main.nx # 类型系统 Lint (v1.3.1+)
70+
nexa intent check main.nx # 意图检查 (v1.1+)
71+
nexa intent coverage main.nx # 意图覆盖率 (v1.1+)
7272

7373
# 服务与任务
74-
nexa serve main.nexa # 启动 HTTP Server (v1.3.4+)
75-
nexa routes main.nexa # 列出路由 (v1.3.4+)
76-
nexa jobs main.nexa --all # 任务管理 (v1.3.3+)
77-
nexa workers main.nexa # Worker 管理 (v1.3.3+)
74+
nexa serve main.nx # 启动 HTTP Server (v1.3.4+)
75+
nexa routes main.nx # 列出路由 (v1.3.4+)
76+
nexa jobs main.nx --all # 任务管理 (v1.3.3+)
77+
nexa workers main.nx # Worker 管理 (v1.3.3+)
7878
nexa cache clear # 清理缓存
7979
```
8080

0 commit comments

Comments
 (0)