Search in sources :

Example 1 with BinaryMessageNode

use of st.gravel.support.compiler.ast.BinaryMessageNode in project gravel by gravel-st.

the class Parser method parseBinaryMessageChain_receiver_.

public Expression parseBinaryMessageChain_receiver_(final String _aString, final Expression _rec) {
    final Expression _arg;
    final BinaryMessageNode _receiver;
    this.eatWhitespace();
    _arg = this.parseUnaryMessage();
    this.eatWhitespace();
    _receiver = BinaryMessageNode.factory.receiver_selector_argument_(_rec, _aString, _arg);
    return this.parseBinaryOrUnaryMessage_(_receiver);
}
Also used : BinaryMessageNode(st.gravel.support.compiler.ast.BinaryMessageNode) Expression(st.gravel.support.compiler.ast.Expression)

Example 2 with BinaryMessageNode

use of st.gravel.support.compiler.ast.BinaryMessageNode in project gravel by gravel-st.

the class MessageSendRewriter method visitBinaryMessageNode_.

@Override
public Statement visitBinaryMessageNode_(final BinaryMessageNode _anObject) {
    final st.gravel.core.Symbol _selector;
    final st.gravel.support.jvm.Block1<Statement, MessageNode> _res;
    _selector = st.gravel.core.Symbol.value(_anObject.selector());
    st.gravel.support.jvm.Block1<Statement, MessageNode> _temp1 = _specialSelectors.get(_selector);
    _res = ((st.gravel.support.jvm.Block1<Statement, MessageNode>) _temp1);
    if (_res != null) {
        final Statement _trans;
        _trans = _res.value_(_anObject);
        if (_trans != null) {
            return _trans;
        }
    }
    return super.visitBinaryMessageNode_(_anObject);
}
Also used : BinaryMessageNode(st.gravel.support.compiler.ast.BinaryMessageNode) MessageNode(st.gravel.support.compiler.ast.MessageNode) UnaryMessageNode(st.gravel.support.compiler.ast.UnaryMessageNode) KeywordMessageNode(st.gravel.support.compiler.ast.KeywordMessageNode) Statement(st.gravel.support.compiler.ast.Statement)

Aggregations

BinaryMessageNode (st.gravel.support.compiler.ast.BinaryMessageNode)2 Expression (st.gravel.support.compiler.ast.Expression)1 KeywordMessageNode (st.gravel.support.compiler.ast.KeywordMessageNode)1 MessageNode (st.gravel.support.compiler.ast.MessageNode)1 Statement (st.gravel.support.compiler.ast.Statement)1 UnaryMessageNode (st.gravel.support.compiler.ast.UnaryMessageNode)1