Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.ast;
 
 import java.util.List;
This is not a node in the classic sense in that it has no defined or interpret method which can be called. It just stores the position of the literal and the name/value of the literal. We made it a node so that the parser needs to work less hard in its productions. dynamic literals are nodes and by having literals also be nodes means they have a common subtype which is not Object.
public class LiteralNode extends Node implements InvisibleNode {
    private String name;
    public LiteralNode(Token token) {
        super(token.getPosition());
        this. = (Stringtoken.getValue();
    }
    public String getName() {
        return ;
    }

    
Accept for the visitor pattern.

Parameters:
iVisitor the visitor
    public Object accept(NodeVisitor iVisitor) {
        return iVisitor.visitLiteralNode(this);
    }
    public List<NodechildNodes() {
        return ;
    }
    @Override
    public NodeType getNodeType() {
        return .;
    }
New to GrepCode? Check out our FAQ X