use of st.gravel.support.compiler.ast.LiteralNode in project gravel by gravel-st.
the class ArrayLiteralNode method innerSourceOn_.
@Override
public ArrayLiteralNode innerSourceOn_(final StringBuilder _aStream) {
_aStream.append("#(");
boolean _temp1 = true;
for (final LiteralNode _each : _elements) {
if (_temp1) {
_temp1 = false;
} else {
_aStream.append(' ');
}
_each.sourceOn_(_aStream);
}
_aStream.append(')');
return this;
}
use of st.gravel.support.compiler.ast.LiteralNode in project gravel by gravel-st.
the class SourcePrinter method visitArrayLiteralNode_.
@Override
public SourcePrinter visitArrayLiteralNode_(final ArrayLiteralNode _anObject) {
_stream.append("#(");
boolean _temp1 = true;
for (final LiteralNode _each : _anObject.elements()) {
if (_temp1) {
_temp1 = false;
} else {
_stream.append(' ');
}
SourcePrinter.this.visit_(_each);
}
_stream.append(')');
return this;
}
use of st.gravel.support.compiler.ast.LiteralNode in project gravel by gravel-st.
the class MethodNode method pragmaPropertyAt_ifAbsent_.
public Object pragmaPropertyAt_ifAbsent_(final st.gravel.core.Symbol _aKey, final st.gravel.support.jvm.Block0<Object> _aBlock) {
final Object _temp1 = new Object();
try {
final PragmaNode _pr;
_pr = ((PragmaNode) st.gravel.support.jvm.ArrayExtensions.detect_ifNone_(_pragmas, new st.gravel.support.jvm.Predicate1<PragmaNode>() {
@Override
public boolean value_(final PragmaNode _each) {
return _each.isPropertyPragmaAt_(_aKey);
}
}, ((st.gravel.support.jvm.Block0<PragmaNode>) (new st.gravel.support.jvm.Block0<PragmaNode>() {
@Override
public PragmaNode value() {
throw new NonLocalReturn(_aBlock.value(), _temp1);
}
}))));
return ((LiteralNode) _pr.expression().arguments()[1]).value();
} catch (NonLocalReturn nlr) {
if (nlr.marker == _temp1) {
return (Object) nlr.returnValue;
} else {
throw nlr;
}
}
}
Aggregations