Package com.stuffwithstuff.bantam.parselets

Source Code of com.stuffwithstuff.bantam.parselets.NameParselet

package com.stuffwithstuff.bantam.parselets;

import com.stuffwithstuff.bantam.Parser;
import com.stuffwithstuff.bantam.Token;
import com.stuffwithstuff.bantam.expressions.Expression;
import com.stuffwithstuff.bantam.expressions.NameExpression;

/**
* Simple parselet for a named variable like "abc".
*/
public class NameParselet implements PrefixParselet {
  public Expression parse(Parser parser, Token token) {
    return new NameExpression(token.getText());
  }
}
TOP

Related Classes of com.stuffwithstuff.bantam.parselets.NameParselet

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.