Search in sources :

Example 1 with SymbolLiteralNode

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

the class ParserTest method testParseSymbol2.

@Test
public void testParseSymbol2() {
    final SymbolLiteralNode _node;
    _node = ((SymbolLiteralNode) Parser.factory.source_("#foo").parseExpression());
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), SymbolLiteralNode.factory));
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.value(), st.gravel.core.Symbol.value("foo")));
}
Also used : SymbolLiteralNode(st.gravel.support.compiler.ast.SymbolLiteralNode) Test(org.junit.Test)

Example 2 with SymbolLiteralNode

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

the class ParserTest method testParseSymbol1.

@Test
public void testParseSymbol1() {
    final SymbolLiteralNode _node;
    _node = ((SymbolLiteralNode) Parser.factory.source_("#\'from\'\'age\'").parseExpression());
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), SymbolLiteralNode.factory));
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.value(), st.gravel.core.Symbol.value("from\'age")));
}
Also used : SymbolLiteralNode(st.gravel.support.compiler.ast.SymbolLiteralNode) Test(org.junit.Test)

Aggregations

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