Skip to content

Commit 49fdc47

Browse files
committed
feat(docs): add links and code example to usecases and quick-start
Added links to ArchGuard, UnitGen, and ChocolateFactory in the usecases.md file to provide more information about these tools. Also, added a code example in the quick-start.md file to demonstrate how to use the AST in Java.
1 parent 2decca0 commit 49fdc47

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

chapi-ast-cpp/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ dependencies {
2121
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
2222

2323
implementation(kotlin("stdlib-jdk8"))
24+
// Kotlin's reflection.
2425
implementation(kotlin("reflect"))
25-
// Kotlin reflection.
2626
testImplementation(kotlin("test"))
2727

2828
// JUnit 5

docs/quick-start.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,16 @@ public static void main(String[] args) {
6161
}
6262
```
6363

64+
## 3. Use the AST
65+
66+
Use the following code to use the AST:
67+
68+
```java
69+
import chapi.ast.javaast.JavaAnalyser;
70+
71+
// main
72+
public static void main(String[] args) {
73+
JavaAnalyser analyser = new JavaAnalyser();
74+
List<CodeContainer> containerList= analyser.parse("public class HelloWorld { public static void main(String[] args) { System.out.println(\"Hello, World\"); } }", "HelloWorld.java");
75+
// handle the containerList
76+
```

docs/usecases/usecases.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@ has_children: true
66
permalink: /usecases
77
---
88

9+
- [ArchGuard](https://github.com/archguard/archguard) - ArchGuard is an architecture workbench, also for architecture
10+
governance, which can analysis architecture in container, component, code level, create architecture fitness
11+
functions,
12+
and analysis system dependencies.
13+
- [UnitGen](https://github.com/unit-mesh/unit-gen) is a code fine-tuning data framework that generates data from your
14+
existing codebase.
15+
- [ChocolateFactory](https://github.com/unit-mesh/chocolate-factory) is a cutting-edge LLM toolkit designed to empower
16+
you in creating your very own AI assistant.

0 commit comments

Comments
 (0)