Use HashSet instead of ISet for improved compatibility with earlier frameworks

This commit is contained in:
Sam Harwell 2013-02-27 12:59:44 -06:00
parent 7e55c0a4e8
commit dbc1bc5a51
2 changed files with 2 additions and 2 deletions

View File

@ -403,7 +403,7 @@ namespace Antlr4.Runtime.Atn
StringBuilder builder = new StringBuilder();
builder.Append("digraph G {\n");
builder.Append("rankdir=LR;\n");
ISet<PredictionContext> visited = new HashSet<PredictionContext>();
HashSet<PredictionContext> visited = new HashSet<PredictionContext>();
Stack<PredictionContext> workList = new Stack<PredictionContext>();
workList.Push(Context);
visited.Add(Context);

View File

@ -386,7 +386,7 @@ namespace Antlr4.Runtime.Atn
}
private static IList<SemanticContext.PrecedencePredicate> FilterPrecedencePredicates
(ISet<SemanticContext> collection)
(HashSet<SemanticContext> collection)
{
if (!collection.OfType<PrecedencePredicate>().Any())
Collections.EmptyList<PrecedencePredicate>();