Skip to content

Commit

Permalink
docs: update kcl 092 api documents
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Jul 17, 2024
1 parent 23d0279 commit 3d45487
Show file tree
Hide file tree
Showing 48 changed files with 2,090 additions and 1,181 deletions.
6 changes: 3 additions & 3 deletions docs/reference/xlang-api/c-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ The [C API](https://github.com/kcl-lang/lib/tree/main/c) is in the development s

## Prerequisites

+ Make
+ C Compiler
+ Cargo
- Make
- C Compiler
- Cargo

## API Reference

Expand Down
6 changes: 3 additions & 3 deletions docs/reference/xlang-api/cpp-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ The [C++ API](https://github.com/kcl-lang/lib/tree/main/cpp) is in the developme

## Prerequisites

+ CMake >= 3.10
+ C++ Compiler with C++17 Support
+ Cargo
- CMake >= 3.10
- C++ Compiler with C++17 Support
- Cargo

## Installation

Expand Down
32 changes: 0 additions & 32 deletions docs/reference/xlang-api/dotnet-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,38 +57,6 @@ var result = new API().ExecProgram(execArgs);
</p>
</details>

### ParseProgram

Parse KCL program with entry files and return the AST JSON string.

<details><summary>Example</summary>
<p>

The content of `schema.k` is

```python
schema AppConfig:
replicas: int

app: AppConfig {
replicas: 2
}
```

C# Code

```csharp
using KclLib.API;

var path = "schema.k"
var args = new ParseProgram_Args();
args.Paths.Add(path);
var result = new API().ParseProgram(args);
```

</p>
</details>

### ParseFile

Parse KCL single file to Module AST JSON string with import dependencies and parse errors.
Expand Down
Loading

0 comments on commit 3d45487

Please sign in to comment.