Search in sources :

Example 11 with PragmaNode

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

the class MethodNode method returnTypeAndBodySourceOn_.

public MethodNode returnTypeAndBodySourceOn_(final StringBuilder _aStream) {
    if (_returnType != null) {
        _aStream.append(' ');
        _aStream.append("{^");
        _returnType.sourceOn_(_aStream);
        _aStream.append('}');
    }
    for (final PragmaNode _each : _pragmas) {
        _aStream.append('\n');
        _aStream.append(' ');
        _each.sourceOn_(_aStream);
    }
    _body.methodSourceOn_(_aStream);
    return this;
}
Also used : PragmaNode(st.gravel.support.compiler.ast.PragmaNode)

Example 12 with PragmaNode

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

the class KeywordMethodNode method returnTypeAndBodySourceOn_.

@Override
public KeywordMethodNode returnTypeAndBodySourceOn_(final StringBuilder _aStream) {
    if (_returnType != null) {
        _aStream.append(' ');
        _aStream.append("{^");
        _returnType.sourceOn_(_aStream);
        _aStream.append('}');
    }
    for (final PragmaNode _each : _pragmas) {
        _aStream.append('\n');
        _aStream.append(' ');
        _each.sourceOn_(_aStream);
    }
    _body.methodSourceOn_(_aStream);
    return this;
}
Also used : PragmaNode(st.gravel.support.compiler.ast.PragmaNode)

Aggregations

PragmaNode (st.gravel.support.compiler.ast.PragmaNode)12 BlockTypeNode (st.gravel.support.compiler.ast.BlockTypeNode)4 InstanceTypeNode (st.gravel.support.compiler.ast.InstanceTypeNode)4 SelfTypeNode (st.gravel.support.compiler.ast.SelfTypeNode)4 TypeNode (st.gravel.support.compiler.ast.TypeNode)4 VariableDeclarationNode (st.gravel.support.compiler.ast.VariableDeclarationNode)4 ArrayList (java.util.ArrayList)3 List (java.util.List)3 SequenceNode (st.gravel.support.compiler.ast.SequenceNode)3 TypeCast (st.gravel.support.compiler.ast.TypeCast)3 ArrayLiteralNode (st.gravel.support.compiler.ast.ArrayLiteralNode)2 StringLiteralNode (st.gravel.support.compiler.ast.StringLiteralNode)2 BlockNode (st.gravel.support.compiler.ast.BlockNode)1 Expression (st.gravel.support.compiler.ast.Expression)1 LiteralNode (st.gravel.support.compiler.ast.LiteralNode)1 NilLiteralNode (st.gravel.support.compiler.ast.NilLiteralNode)1 Statement (st.gravel.support.compiler.ast.Statement)1 SymbolLiteralNode (st.gravel.support.compiler.ast.SymbolLiteralNode)1 NonLocalReturn (st.gravel.support.jvm.NonLocalReturn)1