use of st.gravel.support.compiler.ast.Statement in project gravel by gravel-st.
the class ParserTest method testParseKeywordBinaryUnaryExpression4.
@Test
public void testParseKeywordBinaryUnaryExpression4() {
final Statement _node;
_node = Parser.factory.source_("2 + 7 bar foo: 7 bar: 4 baz foo: 2 + 1 boo: 3 foo + 2 roo: 3 + 2 foo noo: 3 hoo + 2 joo").parseExpression();
assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), KeywordMessageNode.factory));
assertEquals((String) "2 + 7 bar\n\tfoo: 7\n\tbar: 4 baz\n\tfoo: 2 + 1\n\tboo: 3 foo + 2\n\troo: 3 + 2 foo\n\tnoo: 3 hoo + 2 joo", (String) _node.prettySourceString());
}
use of st.gravel.support.compiler.ast.Statement in project gravel by gravel-st.
the class ParserTest method testParse2ArgBlockNoTemps.
@Test
public void testParse2ArgBlockNoTemps() {
final Statement _node;
_node = Parser.factory.source_("[:a :b | a foo. b bar]").parseExpression();
assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), BlockNode.factory));
assertEquals((String) "\n[:a :b | \na foo.\nb bar]", (String) _node.prettySourceString());
}
use of st.gravel.support.compiler.ast.Statement in project gravel by gravel-st.
the class ParserTest method testParseKeywordBinaryUnaryExpression1.
@Test
public void testParseKeywordBinaryUnaryExpression1() {
final Statement _node;
_node = Parser.factory.source_("2 bar + 7 foo: 7 bar: 4 baz foo: 2 + 1 boo: 3 foo + 2 roo: 3 + 2 foo noo: 3 hoo + 2 joo").parseExpression();
assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), KeywordMessageNode.factory));
assertEquals((String) "2 bar + 7\n\tfoo: 7\n\tbar: 4 baz\n\tfoo: 2 + 1\n\tboo: 3 foo + 2\n\troo: 3 + 2 foo\n\tnoo: 3 hoo + 2 joo", (String) _node.prettySourceString());
}
use of st.gravel.support.compiler.ast.Statement in project gravel by gravel-st.
the class ParserTest method testParseUnaryBlockWithTemps.
@Test
public void testParseUnaryBlockWithTemps() {
final Statement _node;
_node = Parser.factory.source_("[:a | | b | a foo. b bar]").parseExpression();
assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), BlockNode.factory));
assertEquals((String) "\n[:a | \n| b |\na foo.\nb bar]", (String) _node.prettySourceString());
}
use of st.gravel.support.compiler.ast.Statement in project gravel by gravel-st.
the class ParserTest method testParse2ArgBlockNoTempsDotEnd.
@Test
public void testParse2ArgBlockNoTempsDotEnd() {
final Statement _node;
_node = Parser.factory.source_("[:a :b | a foo. b bar.]").parseExpression();
assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), BlockNode.factory));
assertEquals((String) "\n[:a :b | \na foo.\nb bar]", (String) _node.prettySourceString());
}
Aggregations