@@ -209,7 +209,8 @@ func (ls *INOLanguageServer) clang2IdeDocumentSymbols(logger jsonrpc.FunctionLog
209209 logger .Logf (" > convert %s %s" , clangSymbol .Kind , clangSymbol .Range )
210210 ideURI , ideRange , isPreprocessed , err := ls .clang2IdeRangeAndDocumentURI (logger , clangURI , clangSymbol .Range )
211211 if err != nil {
212- return nil , err
212+ logger .Logf (" filtering out invalid symbol range: %s" , err )
213+ continue
213214 }
214215 if isPreprocessed {
215216 logger .Logf (" symbol is in the preprocessed section of the sketch.ino.cpp, skipping" )
@@ -221,7 +222,8 @@ func (ls *INOLanguageServer) clang2IdeDocumentSymbols(logger jsonrpc.FunctionLog
221222 }
222223 ideSelectionURI , ideSelectionRange , isSelectionPreprocessed , err := ls .clang2IdeRangeAndDocumentURI (logger , clangURI , clangSymbol .SelectionRange )
223224 if err != nil {
224- return nil , err
225+ logger .Logf (" filtering out invalid symbol selection-range: %s" , err )
226+ continue
225227 }
226228 if ideSelectionURI != ideURI || isSelectionPreprocessed {
227229 logger .Logf (" ERROR: doc of symbol-selection-range does not match doc of symbol-range" )
@@ -232,7 +234,8 @@ func (ls *INOLanguageServer) clang2IdeDocumentSymbols(logger jsonrpc.FunctionLog
232234
233235 ideChildren , err := ls .clang2IdeDocumentSymbols (logger , clangSymbol .Children , clangURI , origIdeURI )
234236 if err != nil {
235- return nil , err
237+ logger .Logf (" filtering out invalid document-symbol: %s" , err )
238+ continue
236239 }
237240
238241 ideSymbols = append (ideSymbols , lsp.DocumentSymbol {
0 commit comments