Browse Source

fix case sensitivity in IsKeyword check

pull/262/head
Siegfried Pammer 14 years ago
parent
commit
b940799a95
  1. 4
      NRefactory/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs

4
NRefactory/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs

@ -115,7 +115,7 @@ namespace ICSharpCode.NRefactory.VB
StartNode(parameterDeclaration); StartNode(parameterDeclaration);
WriteAttributes(parameterDeclaration.Attributes); WriteAttributes(parameterDeclaration.Attributes);
WriteModifiers(parameterDeclaration.ModifierTokens); WriteModifiers(parameterDeclaration.ModifierTokens);
WriteIdentifier(parameterDeclaration.Name.Name); parameterDeclaration.Name.AcceptVisitor(this, data);
if (!parameterDeclaration.Type.IsNull) { if (!parameterDeclaration.Type.IsNull) {
WriteKeyword("As"); WriteKeyword("As");
parameterDeclaration.Type.AcceptVisitor(this, data); parameterDeclaration.Type.AcceptVisitor(this, data);
@ -1053,7 +1053,7 @@ namespace ICSharpCode.NRefactory.VB
#endregion #endregion
#region IsKeyword Test #region IsKeyword Test
static readonly HashSet<string> unconditionalKeywords = new HashSet<string> { static readonly HashSet<string> unconditionalKeywords = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {
"AddHandler", "AddressOf", "Alias", "And", "AndAlso", "As", "Boolean", "ByRef", "Byte", "AddHandler", "AddressOf", "Alias", "And", "AndAlso", "As", "Boolean", "ByRef", "Byte",
"ByVal", "Call", "Case", "Catch", "CBool", "CByte", "CChar", "CInt", "Class", "CLng", "ByVal", "Call", "Case", "Catch", "CBool", "CByte", "CChar", "CInt", "Class", "CLng",
"CObj", "Const", "Continue", "CSByte", "CShort", "CSng", "CStr", "CType", "CUInt", "CObj", "Const", "Continue", "CSByte", "CShort", "CSng", "CStr", "CType", "CUInt",

Loading…
Cancel
Save