Package com.stuffwithstuff.magpie.parser

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

package com.stuffwithstuff.magpie.parser;

import com.stuffwithstuff.magpie.ast.Expr;

public class EqualsParser implements InfixParser {
  @Override
  public Expr parse(MagpieParser parser, Expr left, Token token) {
    // Parse the value being assigned.
    Expr value = parser.parseStatement();
    return ConvertAssignmentExpr.convert(left, value);
  }
 
  @Override
  public int getPrecedence() { return Precedence.ASSIGNMENT; }
}
TOP

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

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.