move parser out of pkl-core (#1024)

This commit is contained in:
Islon Scherer
2025-03-18 20:23:53 +01:00
committed by GitHub
parent 1cd0549bd6
commit aad530b9a8
80 changed files with 904 additions and 737 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ dependencies {
testImplementation(projects.pklConfigJava)
testImplementation(projects.pklConfigKotlin)
testImplementation(projects.pklCommonsTest)
testImplementation(projects.pklParser)
testImplementation(libs.junitEngine)
testImplementation(libs.antlrRuntime)
}

View File

@@ -21,9 +21,9 @@ import org.pkl.core.repl.ReplResponse
import org.pkl.core.repl.ReplServer
import org.pkl.core.util.IoUtils
import org.pkl.core.http.HttpClient
import org.pkl.core.parser.Parser
import org.pkl.core.parser.ParserError
import org.pkl.core.parser.syntax.ClassProperty
import org.pkl.parser.Parser
import org.pkl.parser.ParserError
import org.pkl.parser.syntax.ClassProperty
import org.pkl.core.resource.ResourceReaders
import java.nio.file.Files
import kotlin.io.path.isDirectory
@@ -302,7 +302,7 @@ class DocSnippetTestsEngine : HierarchicalTestEngine<DocSnippetTestsEngine.Execu
override fun getType() = Type.TEST
private val parsed: org.pkl.core.parser.syntax.Node by lazy {
private val parsed: org.pkl.parser.syntax.Node by lazy {
when (language) {
"pkl" -> Parser().parseModule(code)
"pkl-expr" -> Parser().parseExpressionInput(code)