All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.piacenti.dslmaker.structures.Expression.kt Maven / Gradle / Ivy

Go to download

Kotlin multiplatform library to facilitate creation of DSLs with ANTLR or a simple built in parser

There is a newer version: 1.1.55
Show newest version
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