commonMain.piacenti.dslmaker.structures.Expression.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dsl-maker-js Show documentation
Show all versions of dsl-maker-js Show documentation
Kotlin multiplatform library to facilitate creation of DSLs with ANTLR or a simple built in parser
package piacenti.dslmaker.structures
import piacenti.dslmaker.abstraction.ProductionStep
/**
* @param
* @author Piacenti
*/
class Expression {
val steps = mutableListOf()
/**
* @param steps
*/
constructor(vararg steps: ProductionStep) {
this.steps.addAll(steps)
}
constructor(steps: List) {
this.steps.addAll(steps)
}
override fun toString(): String {
val result = StringBuilder()
for (step in steps) {
result.append(step).append(" ")
}
return result.removeSuffix(" ").toString()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy