Skip to content

Commit fc5a864

Browse files
committed
chore: remove dup api docs
Signed-off-by: peefy <xpf6677@163.com>
1 parent 5cd7324 commit fc5a864

File tree

4 files changed

+2
-170
lines changed

4 files changed

+2
-170
lines changed

dotnet/KclLib/README.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -65,38 +65,6 @@ var result = new API().ExecProgram(execArgs);
6565
</p>
6666
</details>
6767

68-
### ParseProgram
69-
70-
Parse KCL program with entry files and return the AST JSON string.
71-
72-
<details><summary>Example</summary>
73-
<p>
74-
75-
The content of `schema.k` is
76-
77-
```python
78-
schema AppConfig:
79-
replicas: int
80-
81-
app: AppConfig {
82-
replicas: 2
83-
}
84-
```
85-
86-
C# Code
87-
88-
```csharp
89-
using KclLib.API;
90-
91-
var path = "schema.k"
92-
var args = new ParseProgram_Args();
93-
args.Paths.Add(path);
94-
var result = new API().ParseProgram(args);
95-
```
96-
97-
</p>
98-
</details>
99-
10068
### ParseFile
10169

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

java/README.md

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -107,42 +107,6 @@ ExecProgram_Result result = apiInstance.execProgram(args);
107107
</p>
108108
</details>
109109

110-
### parseProgram
111-
112-
Parse KCL program with entry files and return the AST JSON string.
113-
114-
<details><summary>Example</summary>
115-
<p>
116-
117-
The content of `schema.k` is
118-
119-
```python
120-
schema AppConfig:
121-
replicas: int
122-
123-
app: AppConfig {
124-
replicas: 2
125-
}
126-
```
127-
128-
Java Code
129-
130-
```java
131-
import com.kcl.api.*;
132-
import com.kcl.ast.*;
133-
import com.kcl.util.JsonUtil;
134-
135-
API api = new API();
136-
ParseProgram_Result result = api.parseProgram(
137-
ParseProgram_Args.newBuilder().addPaths("schema.k").build()
138-
);
139-
System.out.println(result.getAstJson());
140-
Program program = JsonUtil.deserializeProgram(result.getAstJson());
141-
```
142-
143-
</p>
144-
</details>
145-
146110
### parseFile
147111

148112
Parse KCL single file to Module AST JSON string with import dependencies and parse errors.
@@ -174,42 +138,6 @@ ParseFile_Result result = apiInstance.parseFile(args);
174138
</p>
175139
</details>
176140

177-
### parseProgram
178-
179-
Parse KCL program with entry files and return the AST JSON string.
180-
181-
<details><summary>Example</summary>
182-
<p>
183-
184-
The content of `schema.k` is
185-
186-
```python
187-
schema AppConfig:
188-
replicas: int
189-
190-
app: AppConfig {
191-
replicas: 2
192-
}
193-
```
194-
195-
Java Code
196-
197-
```java
198-
import com.kcl.api.*;
199-
import com.kcl.ast.*;
200-
import com.kcl.util.JsonUtil;
201-
202-
API api = new API();
203-
ParseProgram_Result result = api.parseProgram(
204-
ParseProgram_Args.newBuilder().addPaths("path/to/kcl.k").build()
205-
);
206-
System.out.println(result.getAstJson());
207-
Program program = JsonUtil.deserializeProgram(result.getAstJson());
208-
```
209-
210-
</p>
211-
</details>
212-
213141
### loadPackage
214142

215143
loadPackage provides users with the ability to parse KCL program and semantic model information including symbols, types, definitions, etc.

nodejs/README.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -96,35 +96,6 @@ try {
9696
</p>
9797
</details>
9898

99-
### parseProgram
100-
101-
Parse KCL program with entry files and return the AST JSON string.
102-
103-
<details><summary>Example</summary>
104-
<p>
105-
106-
The content of `schema.k` is
107-
108-
```python
109-
schema AppConfig:
110-
replicas: int
111-
112-
app: AppConfig {
113-
replicas: 2
114-
}
115-
```
116-
117-
Node.js Code
118-
119-
```ts
120-
import { parseProgram, ParseProgramArgs } from "kcl-lib";
121-
122-
const result = parseProgram(new ParseProgramArgs(["schema.k"]));
123-
```
124-
125-
</p>
126-
</details>
127-
12899
### parseFile
129100

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

python/README.md

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -103,39 +103,6 @@ except Exception as err:
103103
</p>
104104
</details>
105105

106-
### parse_program
107-
108-
Parse KCL program with entry files and return the AST JSON string.
109-
110-
<details><summary>Example</summary>
111-
<p>
112-
113-
The content of `schema.k` is
114-
115-
```python
116-
schema AppConfig:
117-
replicas: int
118-
119-
app: AppConfig {
120-
replicas: 2
121-
}
122-
```
123-
124-
Python Code
125-
126-
```python
127-
import kcl_lib.api as api
128-
129-
args = api.ParseProgram_Args(paths=["schema.k"])
130-
api = api.API()
131-
result = api.parse_program(args)
132-
assert len(result.paths) == 1
133-
assert len(result.errors) == 0
134-
```
135-
136-
</p>
137-
</details>
138-
139106
### parse_file
140107

141108
Parse KCL single file to Module AST JSON string with import dependencies and parse errors.
@@ -159,11 +126,9 @@ Python Code
159126
```python
160127
import kcl_lib.api as api
161128

162-
args = api.ParseProgram_Args(paths=[TEST_FILE])
129+
args = api.ParseParseFile_Args(path=TEST_FILE)
163130
api = api.API()
164-
result = api.parse_program(args)
165-
assert len(result.paths) == 1
166-
assert len(result.errors) == 0
131+
result = api.parse_file(args)
167132
```
168133

169134
</p>

0 commit comments

Comments
 (0)