private IList<IAnchor> CreateReferenceAnchorPoints(ITextSnapshot snapshot, GrammarParser.GrammarSpecContext parseResult) { if (parseResult == null) { AntlrParseResultEventArgs resultEventArgs = Antlr4BackgroundParser.ParseSnapshot(snapshot); parseResult = (GrammarParser.GrammarSpecContext)resultEventArgs.Result; } AnchorListener listener = new AnchorListener(snapshot); ParseTreeWalker.Default.Walk(listener, parseResult); return listener.Anchors; }
private IList <IAnchor> CreateReferenceAnchorPoints(ITextSnapshot snapshot, GrammarParser.GrammarSpecContext parseResult) { if (parseResult == null) { AntlrParseResultEventArgs resultEventArgs = Antlr4BackgroundParser.ParseSnapshot(snapshot); parseResult = (GrammarParser.GrammarSpecContext)resultEventArgs.Result; } AnchorListener listener = new AnchorListener(snapshot); ParseTreeWalker.Default.Walk(listener, parseResult); return(listener.Anchors); }