Search in sources :

Example 1 with CharacterLiteralNode

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

the class ParserTest method testParseChar.

@Test
public void testParseChar() {
    final CharacterLiteralNode _node;
    _node = ((CharacterLiteralNode) Parser.factory.source_("$a").parseExpression());
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), CharacterLiteralNode.factory));
    assertEquals((String) "$a", (String) _node.prettySourceString());
    assertTrue(st.gravel.support.jvm.CharacterExtensions.equals_(_node.value(), 'a'));
}
Also used : CharacterLiteralNode(st.gravel.support.compiler.ast.CharacterLiteralNode) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 CharacterLiteralNode (st.gravel.support.compiler.ast.CharacterLiteralNode)1