private void WriteTokenIfReq(Ast.LogicalExpression expression, Token token) { if (expression.IsChild) { WriteToken(token); } }
public override Ast.Expression VisitLogicalExpression(Ast.LogicalExpression expression) { WriteTokenIfReq(expression, Token.LeftParenthesis); this.Visit(expression.Left); WriteLogicalOperator(expression.Operator); this.Visit(expression.Right); WriteTokenIfReq(expression, Token.RightParentThesis); return(expression); }
public virtual Ast.Expression VisitLogicalExpression(Ast.LogicalExpression expression) { this.Visit(expression.Left); this.Visit(expression.Right); return(expression); }