Search in sources :

Example 1 with MapExpr

use of dyvilx.tools.compiler.ast.expression.MapExpr in project Dyvil by Dyvil.

the class ArrayLiteralParser method end.

private void end(IToken token) {
    if (this.values != null) {
        final MapExpr map = new MapExpr(this.startPosition.to(token), this.keys, this.values);
        this.consumer.setValue(map);
        return;
    }
    final ArrayExpr array = new ArrayExpr(this.startPosition.to(token), this.keys);
    this.consumer.setValue(array);
}
Also used : MapExpr(dyvilx.tools.compiler.ast.expression.MapExpr) ArrayExpr(dyvilx.tools.compiler.ast.expression.ArrayExpr)

Aggregations

ArrayExpr (dyvilx.tools.compiler.ast.expression.ArrayExpr)1 MapExpr (dyvilx.tools.compiler.ast.expression.MapExpr)1