コード例 #1
0
 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);
 }
コード例 #2
0
 public static bool IsVariable(this ArrayExpression arrayExpression, EV3Variable variable)
 {
     return(variable.Name.Equals(arrayExpression.VariableName(), StringComparison.InvariantCultureIgnoreCase));
 }
コード例 #3
0
 public static bool IsVariable(this ForStatement statement, EV3Variable variable)
 {
     return(variable.Name.Equals(statement.Iterator.NormalizedText, StringComparison.InvariantCultureIgnoreCase));
 }