public static bool IsVariable(this SBExpression expression, EV3Variable variable) { if (expression is IdentifierExpression) { return(variable.Name.Equals(((IdentifierExpression)expression).VariableName(), StringComparison.InvariantCultureIgnoreCase)); } else if (expression is ArrayExpression) { return(variable.Name.Equals(((ArrayExpression)expression).VariableName(), StringComparison.InvariantCultureIgnoreCase)); } return(false); }
public static bool IsVariable(this ArrayExpression arrayExpression, EV3Variable variable) { return(variable.Name.Equals(arrayExpression.VariableName(), StringComparison.InvariantCultureIgnoreCase)); }
public static bool IsVariable(this ForStatement statement, EV3Variable variable) { return(variable.Name.Equals(statement.Iterator.NormalizedText, StringComparison.InvariantCultureIgnoreCase)); }