Skip to content

Commit

Permalink
no, annotation processor are bad
Browse files Browse the repository at this point in the history
  • Loading branch information
mio-19 committed Oct 25, 2024
1 parent 04f0a78 commit e35561f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -1201,16 +1201,16 @@ lazy val buildTool = crossProject(JVMPlatform)
)
)

lazy val eval = crossProject(JSPlatform, JVMPlatform, NativePlatform)
lazy val interpreter = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.in(file("eval"))
.in(file("interpreter"))
.dependsOn(platform)
.settings(commonSettings)
// https://github.com/b-studios/scala-graal-truffle-example/blob/c2747a6eece156f878c5b934116aaa00a2cd6311/build.sbt
.settings(
name := "eval",
assembly / assemblyOutputPath := file("target") / "chester-eval.jar"
name := "interpreter",
assembly / assemblyOutputPath := file("target") / "chester-interpreter.jar"
)
.jvmSettings(
assembly / test := {},
Expand Down Expand Up @@ -1282,7 +1282,7 @@ lazy val root = crossProject(JSPlatform, JVMPlatform, NativePlatform)
lsp,
buildProtocol,
buildTool,
eval,
interpreter,
js,
site,
docs
Expand Down
16 changes: 16 additions & 0 deletions interpreter/jvm/src/main/scala/chester/truffle/index.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package chester.truffle

import com.oracle.truffle.api.{CallTarget, TruffleLanguage}
import com.oracle.truffle.api.TruffleLanguage.{Env, ParsingRequest}

trait ChesterContext

@TruffleLanguage.Registration(id = "cst", name = "Chester")
class ChesterLang extends TruffleLanguage[ChesterContext] {
@throws[Exception]
override protected def parse(request: ParsingRequest): CallTarget = {
???
}

override protected def createContext(env: Env): ChesterContext = null
}
File renamed without changes.
3 changes: 3 additions & 0 deletions interpreter/references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/skinny85/graalvm-truffle-tutorial/blob/master/part-15/src/main/java/com/endoflineblog/truffle/part_15/EasyScriptTruffleLanguage.java

https://www.endoflineblog.com/graal-truffle-tutorial-part-0-what-is-truffle

0 comments on commit e35561f

Please sign in to comment.