Skip to content

Commit 069b280

Browse files
committed
Fix typo in evaluate
1 parent 4cd3fd3 commit 069b280

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ValveKeyValue/ValveKeyValue/Deserialization/KVObjectBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ KVObject MakeObject(KVPartialState state)
167167

168168
if (state.IsArray)
169169
{
170-
throw new InvalidCastException("Tried to make an object ouf of an array.");
170+
throw new InvalidCastException("Tried to make an object out of an array.");
171171
}
172172

173173
if (state.Value != null)

ValveKeyValue/ValveKeyValue/Deserialization/KeyValues1/KV1TextReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void HandleCondition(string text)
216216
throw new InvalidDataException($"Found conditional while in state {stateMachine.Current}.");
217217
}
218218

219-
if (!conditionEvaluator.Evalute(text))
219+
if (!conditionEvaluator.Evaluate(text))
220220
{
221221
stateMachine.SetDiscardCurrent();
222222
}

ValveKeyValue/ValveKeyValue/KVConditionEvaluator.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public KVConditionEvaluator(ICollection<string> definedVariables)
1616

1717
readonly ICollection<string> definedVariables;
1818

19-
public bool Evalute(string expressionText)
19+
public bool Evaluate(string expressionText)
2020
{
2121
Expression expression;
2222
try
@@ -92,7 +92,7 @@ Expression CreateExpression(IList<KVConditionToken> tokens)
9292
switch (token.TokenType)
9393
{
9494
case KVConditionTokenType.Value:
95-
return EvaluteVariableExpression((string)token.Value);
95+
return EvaluateVariableExpression((string)token.Value);
9696

9797
case KVConditionTokenType.PreprocessedExpression:
9898
return (Expression)token.Value;
@@ -133,17 +133,17 @@ void PreprocessBracketedExpressions(IList<KVConditionToken> tokens)
133133
}
134134

135135
var subRange = tokens.Skip(startIndex + 1).Take(endIndex - startIndex - 1).ToList();
136-
var evalutedExpression = CreateExpression(subRange);
136+
var evaluatedExpression = CreateExpression(subRange);
137137

138138
for (int i = 0; i < endIndex - startIndex + 1; i++)
139139
{
140140
tokens.RemoveAt(startIndex);
141141
}
142142

143-
tokens.Insert(startIndex, new KVConditionToken(evalutedExpression));
143+
tokens.Insert(startIndex, new KVConditionToken(evaluatedExpression));
144144
}
145145

146-
MethodCallExpression EvaluteVariableExpression(string variable)
146+
MethodCallExpression EvaluateVariableExpression(string variable)
147147
{
148148
var instance = Expression.Constant(this);
149149
var method = typeof(KVConditionEvaluator)

0 commit comments

Comments
 (0)