Package com.stuffwithstuff.magpie.parser

Source Code of com.stuffwithstuff.magpie.parser.ParenthesisPrefixParser

package com.stuffwithstuff.magpie.parser;

import com.stuffwithstuff.magpie.ast.Expr;

public class ParenthesisPrefixParser implements PrefixParser {
  @Override
  public Expr parse(MagpieParser parser, Token token) {
    Expr expr = parser.parseStatement();
    parser.consume(TokenType.RIGHT_PAREN);
   
    return expr;
  }
}
TOP

Related Classes of com.stuffwithstuff.magpie.parser.ParenthesisPrefixParser

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.