diff --git a/src/System.Management.Automation/engine/parser/CharTraits.cs b/src/System.Management.Automation/engine/parser/CharTraits.cs index 6aed5f260..efb5f5d61 100644 --- a/src/System.Management.Automation/engine/parser/CharTraits.cs +++ b/src/System.Management.Automation/engine/parser/CharTraits.cs @@ -265,7 +265,7 @@ namespace System.Management.Automation.Language // Return true if the character can be the first character of // an identifier or label. - internal static bool IsIndentifierStart(this char c) + internal static bool IsIdentifierStart(this char c) { if (c < 128) { @@ -276,7 +276,7 @@ namespace System.Management.Automation.Language // Return true if the character can follow the first character of // an identifier or label. - internal static bool IsIndentifierFollow(this char c) + internal static bool IsIdentifierFollow(this char c) { if (c < 128) { diff --git a/src/System.Management.Automation/engine/parser/Parser.cs b/src/System.Management.Automation/engine/parser/Parser.cs index 7d6a70c7f..7ebedd8cc 100644 --- a/src/System.Management.Automation/engine/parser/Parser.cs +++ b/src/System.Management.Automation/engine/parser/Parser.cs @@ -3604,7 +3604,7 @@ namespace System.Management.Automation.Language ExpressionAst body = null; if (keywordData.BodyMode == DynamicKeywordBodyMode.ScriptBlock) { - var oldInConfiguraiton = _inConfiguration; + var oldInConfiguration = _inConfiguration; try { _inConfiguration = false; @@ -3612,7 +3612,7 @@ namespace System.Management.Automation.Language } finally { - _inConfiguration = oldInConfiguraiton; + _inConfiguration = oldInConfiguration; } } else if (keywordData.BodyMode == DynamicKeywordBodyMode.Hashtable) diff --git a/src/System.Management.Automation/engine/parser/SemanticChecks.cs b/src/System.Management.Automation/engine/parser/SemanticChecks.cs index 579498ee3..18b9765d1 100644 --- a/src/System.Management.Automation/engine/parser/SemanticChecks.cs +++ b/src/System.Management.Automation/engine/parser/SemanticChecks.cs @@ -334,19 +334,19 @@ namespace System.Management.Automation.Language public override AstVisitAction VisitTypeDefinition(TypeDefinitionAst typeDefinitionAst) { - AttributeAst dscResourceAttibuteAst = null; + AttributeAst dscResourceAttributeAst = null; for (int i = 0; i < typeDefinitionAst.Attributes.Count; i++) { var attr = typeDefinitionAst.Attributes[i]; if (attr.TypeName.GetReflectionAttributeType() == typeof(DscResourceAttribute)) { - dscResourceAttibuteAst = attr; + dscResourceAttributeAst = attr; break; } } - if (dscResourceAttibuteAst != null) + if (dscResourceAttributeAst != null) { - DscResourceChecker.CheckType(_parser, typeDefinitionAst, dscResourceAttibuteAst); + DscResourceChecker.CheckType(_parser, typeDefinitionAst, dscResourceAttributeAst); } return AstVisitAction.Continue; diff --git a/src/System.Management.Automation/engine/parser/TypeResolver.cs b/src/System.Management.Automation/engine/parser/TypeResolver.cs index 0251c5733..4a9b04460 100644 --- a/src/System.Management.Automation/engine/parser/TypeResolver.cs +++ b/src/System.Management.Automation/engine/parser/TypeResolver.cs @@ -67,7 +67,7 @@ namespace System.Management.Automation.Language } } - private static Type LookForTypeInAssemblies(TypeName typeName, IEnumerable assemblies, TypeResolutionState typeResolutionState, bool reportAmbigousException, out Exception exception) + private static Type LookForTypeInAssemblies(TypeName typeName, IEnumerable assemblies, TypeResolutionState typeResolutionState, bool reportAmbiguousException, out Exception exception) { exception = null; string alternateNameToFind = typeResolutionState.GetAlternateTypeName(typeName.Name); @@ -85,7 +85,7 @@ namespace System.Management.Automation.Language if (targetType != null) { - if (!reportAmbigousException) + if (!reportAmbiguousException) { // accelerator for the common case, when we are not interested in ambiguity exception. return targetType; @@ -159,7 +159,7 @@ namespace System.Management.Automation.Language return true; } - private static Type ResolveTypeNameWorker(TypeName typeName, SessionStateScope currentScope, IEnumerable loadedAssemblies, TypeResolutionState typeResolutionState, bool reportAmbigousException, out Exception exception) + private static Type ResolveTypeNameWorker(TypeName typeName, SessionStateScope currentScope, IEnumerable loadedAssemblies, TypeResolutionState typeResolutionState, bool reportAmbiguousException, out Exception exception) { Type result; exception = null; @@ -179,7 +179,7 @@ namespace System.Management.Automation.Language } exception = null; - result = LookForTypeInAssemblies(typeName, loadedAssemblies, typeResolutionState, reportAmbigousException, out exception); + result = LookForTypeInAssemblies(typeName, loadedAssemblies, typeResolutionState, reportAmbiguousException, out exception); if (exception != null) { // skip the rest of lookups, if exception reported. @@ -304,10 +304,10 @@ namespace System.Management.Automation.Language return typeName._typeDefinitionAst.Type; } - result = ResolveTypeNameWorker(typeName, currentScope, typeResolutionState.assemblies, typeResolutionState, /* reportAmbigousException */ true, out exception); + result = ResolveTypeNameWorker(typeName, currentScope, typeResolutionState.assemblies, typeResolutionState, /* reportAmbiguousException */ true, out exception); if (exception == null && result == null) { - result = ResolveTypeNameWorker(typeName, currentScope, assemList, typeResolutionState, /* reportAmbigousException */ false, out exception); + result = ResolveTypeNameWorker(typeName, currentScope, assemList, typeResolutionState, /* reportAmbiguousException */ false, out exception); } if (result != null) @@ -332,10 +332,10 @@ namespace System.Management.Automation.Language assemList = ClrFacade.GetAssemblies(typeResolutionState, newTypeName); } #endif - var newResult = ResolveTypeNameWorker(newTypeName, currentScope, typeResolutionState.assemblies, typeResolutionState, /* reportAmbigousException */ true, out exception); + var newResult = ResolveTypeNameWorker(newTypeName, currentScope, typeResolutionState.assemblies, typeResolutionState, /* reportAmbiguousException */ true, out exception); if (exception == null && newResult == null) { - newResult = ResolveTypeNameWorker(newTypeName, currentScope, assemList, typeResolutionState, /* reportAmbigousException */ false, out exception); + newResult = ResolveTypeNameWorker(newTypeName, currentScope, assemList, typeResolutionState, /* reportAmbiguousException */ false, out exception); } if (exception != null) diff --git a/src/System.Management.Automation/engine/parser/VariableAnalysis.cs b/src/System.Management.Automation/engine/parser/VariableAnalysis.cs index eca4e98e6..419cc5632 100644 --- a/src/System.Management.Automation/engine/parser/VariableAnalysis.cs +++ b/src/System.Management.Automation/engine/parser/VariableAnalysis.cs @@ -11,7 +11,7 @@ using System.Reflection; namespace System.Management.Automation.Language { - internal static class VariablePathExtentions + internal static class VariablePathExtensions { internal static bool IsAnyLocal(this VariablePath variablePath) { diff --git a/src/System.Management.Automation/engine/parser/ast.cs b/src/System.Management.Automation/engine/parser/ast.cs index 2c394da30..d58c345e4 100644 --- a/src/System.Management.Automation/engine/parser/ast.cs +++ b/src/System.Management.Automation/engine/parser/ast.cs @@ -9886,7 +9886,7 @@ namespace System.Management.Automation.Language internal StringConstantExpressionAst(StringToken token) : base(token.Extent, token.Value) { - this.StringConstantType = MapTokenKindToStringContantKind(token); + this.StringConstantType = MapTokenKindToStringConstantKind(token); } /// @@ -9915,7 +9915,7 @@ namespace System.Management.Automation.Language get { return typeof(string); } } - internal static StringConstantType MapTokenKindToStringContantKind(Token token) + internal static StringConstantType MapTokenKindToStringConstantKind(Token token) { switch (token.Kind) { @@ -10019,7 +10019,7 @@ namespace System.Management.Automation.Language internal ExpandableStringExpressionAst(Token token, string value, string formatString, IEnumerable nestedExpressions) : this(token.Extent, value, formatString, StringConstantExpressionAst - .MapTokenKindToStringContantKind(token), + .MapTokenKindToStringConstantKind(token), nestedExpressions) { } diff --git a/src/System.Management.Automation/engine/parser/tokenizer.cs b/src/System.Management.Automation/engine/parser/tokenizer.cs index dfb833e42..f92a98696 100644 --- a/src/System.Management.Automation/engine/parser/tokenizer.cs +++ b/src/System.Management.Automation/engine/parser/tokenizer.cs @@ -3513,7 +3513,7 @@ namespace System.Management.Automation.Language { c = GetChar(); - if (c.IsIndentifierFollow()) + if (c.IsIdentifierFollow()) { sb.Append(c); } @@ -3677,7 +3677,7 @@ namespace System.Management.Automation.Language var sb = GetStringBuilder(); char c = GetChar(); - if (!c.IsIndentifierStart()) + if (!c.IsIdentifierStart()) { // Must be a generic token then sb.Append(':'); @@ -3690,7 +3690,7 @@ namespace System.Management.Automation.Language return ScanGenericToken(sb); } - while (c.IsIndentifierFollow()) + while (c.IsIdentifierFollow()) { sb.Append(c); c = GetChar(); @@ -4057,7 +4057,7 @@ namespace System.Management.Automation.Language case '!': c1 = PeekChar(); if ((InCommandMode() && !c1.ForceStartNewToken()) || - (InExpressionMode() && c1.IsIndentifierStart())) + (InExpressionMode() && c1.IsIdentifierStart())) { return ScanGenericToken(c); }