private bool StatementIsUnterminated(Expression expression) { switch (NodeType) { case Block: case Lambda: return(false); case MemberInit: return(true); } if (_statementTranslation.IsAssignment()) { return(true); } return(!(expression.IsComment() || _statementTranslation.IsTerminated())); }
public static bool ShouldWriteInParentheses(this ITranslation translation) { return((translation.NodeType == ExpressionType.Conditional) || translation.IsBinary() || translation.IsAssignment() || CastTranslation.IsCast(translation.NodeType)); }