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

prompto.javascript.JavaScriptParenthesisExpression Maven / Gradle / Ivy

The newest version!
package prompto.javascript;

import prompto.transpiler.Transpiler;
import prompto.utils.CodeWriter;

public class JavaScriptParenthesisExpression implements JavaScriptExpression {

	JavaScriptExpression expression;
	
	public JavaScriptParenthesisExpression(JavaScriptExpression expression) {
		this.expression = expression;
	}

	@Override
	public void toDialect(CodeWriter writer) {
		writer.append('(');
		expression.toDialect(writer);
		writer.append(')');
	}
	
	@Override
	public void transpile(Transpiler transpiler) {
		transpiler.append('(');
		expression.transpile(transpiler);
		transpiler.append(')');
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy