Search in sources :

Example 1 with KeywordMethodNode

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

the class ParserTest method testParseKeywordMethod1.

@Test
public void testParseKeywordMethod1() {
    final KeywordMethodNode _node;
    _node = ((KeywordMethodNode) Parser.factory.parseMethod_("foo: arg1 ^bar"));
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), KeywordMethodNode.factory));
    assertEquals((String) "foo: arg1\n\t^bar", (String) _node.prettySourceString());
}
Also used : KeywordMethodNode(st.gravel.support.compiler.ast.KeywordMethodNode) Test(org.junit.Test)

Example 2 with KeywordMethodNode

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

the class ParserTest method testParseKeywordMethod2.

@Test
public void testParseKeywordMethod2() {
    final KeywordMethodNode _node;
    _node = ((KeywordMethodNode) Parser.factory.parseMethod_("foo: arg1 bar: arg2 ^bar"));
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), KeywordMethodNode.factory));
    assertEquals((String) "foo: arg1 bar: arg2\n\t^bar", (String) _node.prettySourceString());
}
Also used : KeywordMethodNode(st.gravel.support.compiler.ast.KeywordMethodNode) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 KeywordMethodNode (st.gravel.support.compiler.ast.KeywordMethodNode)2