From 3cdbbba6e0ad65cf6b3dbb4c75bdd362aad3f017 Mon Sep 17 00:00:00 2001 From: Alexandre Mommers Date: Tue, 2 Jan 2024 05:16:26 +0100 Subject: [PATCH] Add Libclang parsing in KlangPlugin Libclang parsing method is now included in KlangPlugin, providing an additional option to Docker. The associated method for generating Abstract Syntax Trees (ASTs) has also been adapted. However, full feature set of Libclang parsing method still needs to be implemented. --- .../gradle-plugin/src/main/kotlin/io/ygdrasil/KlangPlugin.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/klang/gradle-plugin/src/main/kotlin/io/ygdrasil/KlangPlugin.kt b/klang/gradle-plugin/src/main/kotlin/io/ygdrasil/KlangPlugin.kt index 0a963344..f5ed6c51 100644 --- a/klang/gradle-plugin/src/main/kotlin/io/ygdrasil/KlangPlugin.kt +++ b/klang/gradle-plugin/src/main/kotlin/io/ygdrasil/KlangPlugin.kt @@ -8,6 +8,7 @@ import klang.domain.NativeStructure import klang.domain.NativeTypeAlias import klang.generator.generateKotlinFile import klang.parser.json.parseAstJson +import klang.parser.libclang.parseFile import klang.tools.generateAstFromDocker import org.gradle.api.Plugin import org.gradle.api.Project @@ -134,7 +135,9 @@ class KlangPlugin : Plugin { parseAstJson(jsonFile.absolutePath) } ParsingMethod.Libclang -> { - TODO() + parseFile( + fileToParse + ) } }.also { it.resolveTypes() }