Skip to content

Commit

Permalink
feat(docs): add links and code example to usecases and quick-start
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
phodal committed Feb 4, 2024
1 parent 2decca0 commit 49fdc47
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chapi-ast-cpp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")

implementation(kotlin("stdlib-jdk8"))
// Kotlin's reflection.
implementation(kotlin("reflect"))
// Kotlin reflection.
testImplementation(kotlin("test"))

// JUnit 5
Expand Down
13 changes: 13 additions & 0 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,16 @@ public static void main(String[] args) {
}
```

## 3. Use the AST

Use the following code to use the AST:

```java
import chapi.ast.javaast.JavaAnalyser;

// main
public static void main(String[] args) {
JavaAnalyser analyser = new JavaAnalyser();
List<CodeContainer> containerList= analyser.parse("public class HelloWorld { public static void main(String[] args) { System.out.println(\"Hello, World\"); } }", "HelloWorld.java");
// handle the containerList
```
8 changes: 8 additions & 0 deletions docs/usecases/usecases.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ has_children: true
permalink: /usecases
---

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

0 comments on commit 49fdc47

Please sign in to comment.