001/*
002 * Copyright (c) 2012-2017 Institut National des Sciences Appliquées de Lyon (INSA-Lyon)
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 */
009
010package org.eclipse.golo.compiler.parser;
011
012import java.util.ArrayList;
013import java.util.List;
014
015public class ASTMultiplicativeExpression extends GoloASTNode {
016
017  private final List<String> operators = new ArrayList<>();
018
019  public ASTMultiplicativeExpression(int id) {
020    super(id);
021  }
022
023  public ASTMultiplicativeExpression(GoloParser p, int id) {
024    super(p, id);
025  }
026
027  @Override
028  public Object jjtAccept(GoloParserVisitor visitor, Object data) {
029    return visitor.visit(this, data);
030  }
031
032  public List<String> getOperators() {
033    return operators;
034  }
035
036  public void addOperator(String symbol) {
037    operators.add(symbol);
038  }
039
040  @Override
041  public String toString() {
042    return String.format("ASTMultiplicativeExpression{operators=%s}", operators);
043  }
044}