private string SimpleExpressionPart(SimpleExpressionPartNode node) { string output = ""; output += Term(node.term); switch (node.addop) { case "+": output += "add\n"; break; case "-": output += "sub\n"; break; case "or": output += "or\n"; break; } if (node.part != null) { output += SimpleExpressionPart(node.part); } return(output); }
public SimpleExpressionPartNode SimpleExpressionPart() { var simpleExpressionPart = new SimpleExpressionPartNode(); Match(TokenTypes.ADDOP); simpleExpressionPart.addop = returnToken.value; simpleExpressionPart.term = Term(); if (token.type == TokenTypes.ADDOP) { simpleExpressionPart.part = SimpleExpressionPart(); } return(simpleExpressionPart); }
public SimpleExpressionPartNode() { part = null; }
public SimpleExpressionNode() { part = null; sign = ""; }