@@ -209,7 +209,8 @@ func (ls *INOLanguageServer) clang2IdeDocumentSymbols(logger jsonrpc.FunctionLog
209
209
logger .Logf (" > convert %s %s" , clangSymbol .Kind , clangSymbol .Range )
210
210
ideURI , ideRange , isPreprocessed , err := ls .clang2IdeRangeAndDocumentURI (logger , clangURI , clangSymbol .Range )
211
211
if err != nil {
212
- return nil , err
212
+ logger .Logf (" filtering out invalid symbol range: %s" , err )
213
+ continue
213
214
}
214
215
if isPreprocessed {
215
216
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
221
222
}
222
223
ideSelectionURI , ideSelectionRange , isSelectionPreprocessed , err := ls .clang2IdeRangeAndDocumentURI (logger , clangURI , clangSymbol .SelectionRange )
223
224
if err != nil {
224
- return nil , err
225
+ logger .Logf (" filtering out invalid symbol selection-range: %s" , err )
226
+ continue
225
227
}
226
228
if ideSelectionURI != ideURI || isSelectionPreprocessed {
227
229
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
232
234
233
235
ideChildren , err := ls .clang2IdeDocumentSymbols (logger , clangSymbol .Children , clangURI , origIdeURI )
234
236
if err != nil {
235
- return nil , err
237
+ logger .Logf (" filtering out invalid document-symbol: %s" , err )
238
+ continue
236
239
}
237
240
238
241
ideSymbols = append (ideSymbols , lsp.DocumentSymbol {
0 commit comments