spelling: locals in src/System.Management.Automation/engine/parser
This commit is contained in:
parent
a398315a87
commit
ca440b92e5
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace System.Management.Automation.Language
|
|||
}
|
||||
}
|
||||
|
||||
private static Type LookForTypeInAssemblies(TypeName typeName, IEnumerable<Assembly> assemblies, TypeResolutionState typeResolutionState, bool reportAmbigousException, out Exception exception)
|
||||
private static Type LookForTypeInAssemblies(TypeName typeName, IEnumerable<Assembly> 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<Assembly> loadedAssemblies, TypeResolutionState typeResolutionState, bool reportAmbigousException, out Exception exception)
|
||||
private static Type ResolveTypeNameWorker(TypeName typeName, SessionStateScope currentScope, IEnumerable<Assembly> 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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -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<ExpressionAst> nestedExpressions)
|
||||
: this(token.Extent, value, formatString,
|
||||
StringConstantExpressionAst
|
||||
.MapTokenKindToStringContantKind(token),
|
||||
.MapTokenKindToStringConstantKind(token),
|
||||
nestedExpressions)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue