Skip to content

Commit 8cf2c42

Browse files
author
Kapil Borle
committed
Remove handling powershell hastable literal
1 parent bfcec76 commit 8cf2c42

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/PowerShellEditorServices/Language/LanguageService.cs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -450,41 +450,6 @@ await CommandHelpers.GetCommandInfo(
450450
}
451451
}
452452

453-
/// <summary>
454-
/// Returns a hashtable from its literal representation in PowerShell.
455-
///
456-
/// If the input is null or If the method encounter any error during the conversion it returns null.
457-
/// </summary>
458-
/// <param name="hashtableString"></param>
459-
/// <returns></returns>
460-
public Hashtable GetHashtableFromString(string hashtableString)
461-
{
462-
if (hashtableString == null)
463-
{
464-
return null;
465-
}
466-
467-
ParseError[] parseErrors = null;
468-
Token[] tokens = null;
469-
try
470-
{
471-
var ast = Parser.ParseInput(hashtableString, out tokens, out parseErrors);
472-
if (parseErrors.Length > 0)
473-
{
474-
return null;
475-
}
476-
477-
var hashtableAst = ast.Find(x => x is HashtableAst, false);
478-
return hashtableAst == null
479-
? null
480-
: (hashtableAst as HashtableAst).SafeGetValue() as Hashtable;
481-
}
482-
catch
483-
{
484-
return null;
485-
}
486-
}
487-
488453
#endregion
489454

490455
#region Private Fields

0 commit comments

Comments
 (0)