Skip to content

Commit

Permalink
Merge pull request #420 from Peefy/update-kcl-092-api-docs
Browse files Browse the repository at this point in the history
docs: update kcl 092 api documents
  • Loading branch information
Peefy authored Jul 17, 2024
2 parents 23d0279 + 3d45487 commit dc24259
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 dc24259

Please sign in to comment.