We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug If a struct contains an inline struct without a member name, the LSP crashes and does not restart.
To Reproduce Steps to reproduce the behavior:
struct Foo { int a; int b; } struct Bar { }
Bar
inline Foo foo;
inline Foo
Expected behavior I was expecting the LSP to keep running as normal.
Screenshots N/A
Desktop:
Additional context Here is the output from C3LSP as shown in VS code:
2025/01/20 13:02:50.472 DEBUG [C3-LSP.parser] No crash reports 2025/01/20 13:02:50.481 NOTE [C3-LSP] reading from stdin, writing to stdout 2025/01/20 13:02:50.481 INFO [C3-LSP] new stream connection 2025/01/20 13:02:50.482 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #0: initialize: {"capabilities":{"general":{"markdown":{"parser":"marked","version":"1.1.0"},"positionEncodings":["utf-16"],"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"staleRequestSupport":{"cancel":true,"retryOnContentModified":["textDocument/semanticTokens/full","textDocument/semanticTokens/range","textDocument/semanticTokens/full/delta"]}},"notebookDocument":{"synchronization":{"dynamicRegistration":true,"executionSummarySupport":true}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":true,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"labelDetailsSupport":true,"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"completionList":{"itemDefaults":["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]},"contextSupport":true,"dynamicRegistration":true,"insertTextMode":2},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"diagnostic":{"dynamicRegistration":true,"relatedDocumentSupport":false},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"foldingRange":{"collapsedText":false},"foldingRangeKind":{"valueSet":["comment","imports","region"]},"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"inlayHint":{"dynamicRegistration":true,"resolveSupport":{"properties":["tooltip","textEdits","label.tooltip","label.location","label.command"]}},"inlineValue":{"dynamicRegistration":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true,"rangesSupport":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"augmentsSyntaxTokens":true,"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"serverCancelSupport":true,"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"typeHierarchy":{"dynamicRegistration":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"diagnostics":{"refreshSupport":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"foldingRange":{"refreshSupport":true},"inlayHint":{"refreshSupport":true},"inlineValue":{"refreshSupport":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"resolveSupport":{"properties":["location.range"]},"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.96.4"},"locale":"en","processId":17493,"rootPath":null,"rootUri":null,"trace":"off","workspaceFolders":null} 2025/01/20 13:02:50.483 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #0: initialize: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":true},"completionProvider":{"triggerCharacters":[".",":"]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","],"retriggerCharacters":[")"]},"declarationProvider":true,"definitionProvider":true,"renameProvider":true,"workspace":{"fileOperations":{"didRename":{"filters":[{"pattern":{"glob":"**/*.{c3,c3i}"}}]},"didDelete":{"filters":[{"pattern":{"glob":"**/*.{c3,c3i}"}}]}}}},"serverInfo":{"name":"C3-LSP","version":"0.3.3"}} 2025/01/20 13:02:50.502 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: initialized: {} 2025/01/20 13:02:50.557 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didOpen: {"textDocument":{"languageId":"c3","text":"struct Foo\n{\n\tint a;\n\tint b;\n}","uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":2}} 2025/01/20 13:02:51.339 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: $/setTrace: {"value":"off"} 2025/01/20 13:02:55.978 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":4},"start":{"character":1,"line":4}},"rangeLength":0,"text":"\n"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":3}} 2025/01/20 13:02:56.121 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":0,"line":5},"start":{"character":0,"line":5}},"rangeLength":0,"text":"s"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":4}} 2025/01/20 13:02:56.138 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #1: textDocument/completion: {"context":{"triggerKind":1},"position":{"character":1,"line":5},"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3"}} 2025/01/20 13:02:56.138 DEBUG [C3-LSP.parser] building completion list: "s" 2025/01/20 13:02:56.138 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #1: textDocument/completion: [{"label":"short","kind":14},{"label":"static","kind":14},{"label":"struct","kind":14},{"label":"switch","kind":14}] 2025/01/20 13:02:56.251 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":5},"start":{"character":1,"line":5}},"rangeLength":0,"text":"t"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":5}} 2025/01/20 13:02:56.391 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":2,"line":5},"start":{"character":2,"line":5}},"rangeLength":0,"text":"r"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":6}} 2025/01/20 13:02:56.492 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":3,"line":5},"start":{"character":3,"line":5}},"rangeLength":0,"text":"u"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":7}} 2025/01/20 13:02:56.585 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":4,"line":5},"start":{"character":4,"line":5}},"rangeLength":0,"text":"c"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":8}} 2025/01/20 13:02:56.733 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":5,"line":5},"start":{"character":5,"line":5}},"rangeLength":0,"text":"t"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":9}} 2025/01/20 13:02:56.782 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":6,"line":5},"start":{"character":6,"line":5}},"rangeLength":0,"text":" "}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":10}} 2025/01/20 13:02:56.990 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":7,"line":5},"start":{"character":7,"line":5}},"rangeLength":0,"text":"B"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":11}} 2025/01/20 13:02:57.007 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #2: textDocument/completion: {"context":{"triggerKind":1},"position":{"character":8,"line":5},"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3"}} 2025/01/20 13:02:57.008 DEBUG [C3-LSP.parser] building completion list: "B" 2025/01/20 13:02:57.008 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #2: textDocument/completion: null 2025/01/20 13:02:57.168 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":8,"line":5},"start":{"character":8,"line":5}},"rangeLength":0,"text":"a"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":12}} 2025/01/20 13:02:57.184 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #3: textDocument/completion: {"context":{"triggerKind":1},"position":{"character":9,"line":5},"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3"}} 2025/01/20 13:02:57.184 DEBUG [C3-LSP.parser] building completion list: "Ba" 2025/01/20 13:02:57.184 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #3: textDocument/completion: null 2025/01/20 13:02:57.247 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":9,"line":5},"start":{"character":9,"line":5}},"rangeLength":0,"text":"r"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":13}} 2025/01/20 13:02:57.259 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #4: textDocument/completion: {"context":{"triggerKind":1},"position":{"character":10,"line":5},"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3"}} 2025/01/20 13:02:57.260 DEBUG [C3-LSP.parser] building completion list: "Bar" 2025/01/20 13:02:57.260 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #4: textDocument/completion: null 2025/01/20 13:02:57.585 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":10,"line":5},"start":{"character":10,"line":5}},"rangeLength":0,"text":"\n"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":14}} 2025/01/20 13:02:57.801 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":0,"line":6},"start":{"character":0,"line":6}},"rangeLength":0,"text":"{}"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":15}} 2025/01/20 13:02:59 output: 2025/01/20 13:02:59 output: The root build directory containing project.json could not be found. Did you use the correct directory? 2025/01/20 13:02:59 An error: exit status 1 2025/01/20 13:03:00.034 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":2,"line":6},"start":{"character":1,"line":6}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":16}} 2025/01/20 13:03:00.324 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":6},"start":{"character":1,"line":6}},"rangeLength":0,"text":"\n\t"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":17}} 2025/01/20 13:03:02 output: 2025/01/20 13:03:02 output: The root build directory containing project.json could not be found. Did you use the correct directory? 2025/01/20 13:03:02 An error: exit status 1 2025/01/20 13:03:04.777 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":7},"start":{"character":0,"line":7}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":18}} 2025/01/20 13:03:04.883 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":0,"line":7},"start":{"character":0,"line":7}},"rangeLength":0,"text":" "}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":19}} 2025/01/20 13:03:04.966 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":7},"start":{"character":0,"line":7}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":20}} 2025/01/20 13:03:05.069 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":0,"line":7},"start":{"character":0,"line":7}},"rangeLength":0,"text":" "}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":21}} 2025/01/20 13:03:05.137 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":7},"start":{"character":0,"line":7}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":22}} 2025/01/20 13:03:05.239 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":0,"line":7},"start":{"character":0,"line":7}},"rangeLength":0,"text":" "}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":23}} 2025/01/20 13:03:05.292 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":7},"start":{"character":0,"line":7}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":24}} 2025/01/20 13:03:05.412 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":0,"line":7},"start":{"character":0,"line":7}},"rangeLength":0,"text":" "}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":25}} 2025/01/20 13:03:05.464 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":7},"start":{"character":0,"line":7}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":26}} 2025/01/20 13:03:05.585 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":0,"line":7},"start":{"character":0,"line":7}},"rangeLength":0,"text":" "}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":27}} 2025/01/20 13:03:05.663 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":7},"start":{"character":0,"line":7}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":28}} 2025/01/20 13:03:05.781 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":0,"line":7},"start":{"character":0,"line":7}},"rangeLength":0,"text":" "}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":29}} 2025/01/20 13:03:05.874 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":7},"start":{"character":0,"line":7}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":30}} 2025/01/20 13:03:06.213 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":0,"line":7},"start":{"character":0,"line":7}},"rangeLength":0,"text":"\t"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":31}} 2025/01/20 13:03:06.953 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":7},"start":{"character":1,"line":7}},"rangeLength":0,"text":"i"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":32}} 2025/01/20 13:03:06.972 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #5: textDocument/completion: {"context":{"triggerKind":1},"position":{"character":2,"line":7},"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3"}} 2025/01/20 13:03:06.972 DEBUG [C3-LSP.parser] building completion list: "i" 2025/01/20 13:03:06.972 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #5: textDocument/completion: [{"label":"ichar","kind":14},{"label":"if","kind":14},{"label":"import","kind":14},{"label":"inline","kind":14},{"label":"int","kind":14},{"label":"int128","kind":14},{"label":"iptr","kind":14},{"label":"isz","kind":14}] 2025/01/20 13:03:07.075 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":2,"line":7},"start":{"character":2,"line":7}},"rangeLength":0,"text":"n"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":33}} 2025/01/20 13:03:07.268 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":3,"line":7},"start":{"character":3,"line":7}},"rangeLength":0,"text":"l"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":34}} 2025/01/20 13:03:07.536 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":4,"line":7},"start":{"character":4,"line":7}},"rangeLength":0,"text":"i"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":35}} 2025/01/20 13:03:07.693 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":5,"line":7},"start":{"character":5,"line":7}},"rangeLength":0,"text":"n"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":36}} 2025/01/20 13:03:07.886 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":6,"line":7},"start":{"character":6,"line":7}},"rangeLength":0,"text":"e"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":37}} 2025/01/20 13:03:08.605 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":7,"line":7},"start":{"character":7,"line":7}},"rangeLength":0,"text":" "}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":38}} 2025/01/20 13:03:09.740 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":8,"line":7},"start":{"character":8,"line":7}},"rangeLength":0,"text":"F"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":39}} 2025/01/20 13:03:09.757 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #6: textDocument/completion: {"context":{"triggerKind":1},"position":{"character":9,"line":7},"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3"}} 2025/01/20 13:03:09.757 DEBUG [C3-LSP.parser] building completion list: "F" 2025/01/20 13:03:09.757 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #6: textDocument/completion: [{"label":"Foo","kind":22}] 2025/01/20 13:03:11.129 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":9,"line":7},"start":{"character":9,"line":7}},"rangeLength":0,"text":"o"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":40}} 2025/01/20 13:03:11.730 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":10,"line":7},"start":{"character":10,"line":7}},"rangeLength":0,"text":"o"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":41}} 2025/01/20 13:03:13 output: 2025/01/20 13:03:13 output: The root build directory containing project.json could not be found. Did you use the correct directory? 2025/01/20 13:03:13 An error: exit status 1 2025/01/20 13:03:15.848 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":11,"line":7},"start":{"character":11,"line":7}},"rangeLength":0,"text":" "}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":42}} 2025/01/20 13:03:16.015 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":12,"line":7},"start":{"character":11,"line":7}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":43}} 2025/01/20 13:03:16.214 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":11,"line":7},"start":{"character":11,"line":7}},"rangeLength":0,"text":" "}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":44}} 2025/01/20 13:03:16.308 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":12,"line":7},"start":{"character":11,"line":7}},"rangeLength":1,"text":""}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":45}} 2025/01/20 13:03:17.464 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":11,"line":7},"start":{"character":11,"line":7}},"rangeLength":0,"text":"\n\t"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":46}} 2025/01/20 13:03:17.761 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didChange: {"contentChanges":[{"range":{"end":{"character":1,"line":8},"start":{"character":0,"line":8}},"rangeLength":1,"text":"}"}],"textDocument":{"uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":47}} panic: runtime error: index out of range [0] with length 0 goroutine 30 [running]: github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).parse_struct_body(0xc000902040, 0xc000a6ab70, 0xc000a511e0, 0xc0009fcc30, {0xc000a4bd00, 0x39, 0x39}) github.com/pherrymason/c3-lsp/pkg/parser/node_to_struct.go:193 +0x1505 github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).nodeToStruct(_, _, _, _, {_, _, _}) github.com/pherrymason/c3-lsp/pkg/parser/node_to_struct.go:64 +0x44e github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).ParseSymbols(0xc000902040, 0xc0009fcc30) github.com/pherrymason/c3-lsp/pkg/parser/parser.go:146 +0x14ad github.com/pherrymason/c3-lsp/internal/lsp/project_state.(*ProjectState).RefreshDocumentIdentifiers(0xc0000d0d00, 0xc0009fcc30, 0xc000a4bc80?) github.com/pherrymason/c3-lsp/internal/lsp/project_state/state.go:101 +0x32 github.com/pherrymason/c3-lsp/internal/lsp/project_state.(*ProjectState).UpdateDocument(0xc0000d0d00, {0xc000a4bc40?, 0xc000a6a450?}, {0xc000a4fa80, 0x1, 0x1}, 0xc000902040) github.com/pherrymason/c3-lsp/internal/lsp/project_state/state.go:131 +0x8f github.com/pherrymason/c3-lsp/internal/lsp/server.(*Server).TextDocumentDidChange(0xc00091e540, 0xc000a45220, 0xc000a47dd0?) github.com/pherrymason/c3-lsp/internal/lsp/server/TextDocumentDidChange.go:9 +0x47 github.com/tliron/glsp/protocol_3_16.(*Handler).Handle(0xc0000e2600, 0xc000a45220) github.com/tliron/glsp@v0.2.3-0.20240511204206-c63625272e79/protocol_3_16/handler.go:320 +0x1567 github.com/tliron/glsp/server.(*Server).handle(0xc0000a0720, {0x10461a0, 0xc0001a4000}, 0xc0000fc000, 0xc000113740) github.com/tliron/glsp@v0.2.3-0.20240511204206-c63625272e79/server/handler.go:47 +0x28c github.com/sourcegraph/jsonrpc2.(*HandlerWithErrorConfigurer).Handle(0xc000902150, {0x10461a0, 0xc0001a4000}, 0xc0000fc000, 0xc000113740) github.com/sourcegraph/jsonrpc2@v0.2.0/handler_with_error.go:21 +0x57 github.com/sourcegraph/jsonrpc2.(*Conn).readMessages(0xc0000fc000, {0x10461a0, 0xc0001a4000}) github.com/sourcegraph/jsonrpc2@v0.2.0/conn.go:205 +0x2dd created by github.com/sourcegraph/jsonrpc2.NewConn in goroutine 1 github.com/sourcegraph/jsonrpc2@v0.2.0/conn.go:62 +0x1e6 [Error - 1:03:17 PM] Server process exited with code 2. [Info - 1:03:17 PM] Connection to server got closed. Server will restart. true 2025/01/20 13:03:17.805 DEBUG [C3-LSP.parser] No crash reports 2025/01/20 13:03:17.814 NOTE [C3-LSP] reading from stdin, writing to stdout 2025/01/20 13:03:17.814 INFO [C3-LSP] new stream connection 2025/01/20 13:03:17.814 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #0: initialize: {"capabilities":{"general":{"markdown":{"parser":"marked","version":"1.1.0"},"positionEncodings":["utf-16"],"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"staleRequestSupport":{"cancel":true,"retryOnContentModified":["textDocument/semanticTokens/full","textDocument/semanticTokens/range","textDocument/semanticTokens/full/delta"]}},"notebookDocument":{"synchronization":{"dynamicRegistration":true,"executionSummarySupport":true}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":true,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"labelDetailsSupport":true,"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"completionList":{"itemDefaults":["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]},"contextSupport":true,"dynamicRegistration":true,"insertTextMode":2},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"diagnostic":{"dynamicRegistration":true,"relatedDocumentSupport":false},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"foldingRange":{"collapsedText":false},"foldingRangeKind":{"valueSet":["comment","imports","region"]},"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"inlayHint":{"dynamicRegistration":true,"resolveSupport":{"properties":["tooltip","textEdits","label.tooltip","label.location","label.command"]}},"inlineValue":{"dynamicRegistration":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true,"rangesSupport":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"augmentsSyntaxTokens":true,"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"serverCancelSupport":true,"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"typeHierarchy":{"dynamicRegistration":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"diagnostics":{"refreshSupport":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"foldingRange":{"refreshSupport":true},"inlayHint":{"refreshSupport":true},"inlineValue":{"refreshSupport":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"resolveSupport":{"properties":["location.range"]},"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.96.4"},"locale":"en","processId":17493,"rootPath":null,"rootUri":null,"trace":"off","workspaceFolders":null} 2025/01/20 13:03:17.815 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #0: initialize: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":true},"completionProvider":{"triggerCharacters":[".",":"]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","],"retriggerCharacters":[")"]},"declarationProvider":true,"definitionProvider":true,"renameProvider":true,"workspace":{"fileOperations":{"didRename":{"filters":[{"pattern":{"glob":"**/*.{c3,c3i}"}}]},"didDelete":{"filters":[{"pattern":{"glob":"**/*.{c3,c3i}"}}]}}}},"serverInfo":{"name":"C3-LSP","version":"0.3.3"}} 2025/01/20 13:03:17.815 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: initialized: {} 2025/01/20 13:03:17.816 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didOpen: {"textDocument":{"languageId":"c3","text":"struct Foo\n{\n\tint a;\n\tint b;\n}\nstruct Bar\n{\n\tinline Foo\n}","uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":47}} panic: runtime error: index out of range [0] with length 0 goroutine 30 [running]: github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).parse_struct_body(0xc00097bea0, 0xc000a112c0, 0xc0007814a0, 0xc000a10c30, {0xc000986800, 0x39, 0x39}) github.com/pherrymason/c3-lsp/pkg/parser/node_to_struct.go:193 +0x1505 github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).nodeToStruct(_, _, _, _, {_, _, _}) github.com/pherrymason/c3-lsp/pkg/parser/node_to_struct.go:64 +0x44e github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).ParseSymbols(0xc00097bea0, 0xc000a10c30) github.com/pherrymason/c3-lsp/pkg/parser/parser.go:146 +0x14ad github.com/pherrymason/c3-lsp/internal/lsp/project_state.(*ProjectState).RefreshDocumentIdentifiers(0xc0000d2d00, 0xc000a10c30, 0xc000986800?) github.com/pherrymason/c3-lsp/internal/lsp/project_state/state.go:101 +0x32 github.com/pherrymason/c3-lsp/internal/lsp/server.(*Server).TextDocumentDidOpen(0xc0008090a0, 0xc000a160b8?, 0xc000a16090?) github.com/pherrymason/c3-lsp/internal/lsp/server/TextDocumentDidOpen.go:28 +0x69 github.com/tliron/glsp/protocol_3_16.(*Handler).Handle(0xc0000e4600, 0xc000989450) github.com/tliron/glsp@v0.2.3-0.20240511204206-c63625272e79/protocol_3_16/handler.go:310 +0xd67 github.com/tliron/glsp/server.(*Server).handle(0xc0000a0720, {0x10461a0, 0xc0001a4000}, 0xc0000b81b0, 0xc0007123c0) github.com/tliron/glsp@v0.2.3-0.20240511204206-c63625272e79/server/handler.go:47 +0x28c github.com/sourcegraph/jsonrpc2.(*HandlerWithErrorConfigurer).Handle(0xc000990030, {0x10461a0, 0xc0001a4000}, 0xc0000b81b0, 0xc0007123c0) github.com/sourcegraph/jsonrpc2@v0.2.0/handler_with_error.go:21 +0x57 github.com/sourcegraph/jsonrpc2.(*Conn).readMessages(0xc0000b81b0, {0x10461a0, 0xc0001a4000}) github.com/sourcegraph/jsonrpc2@v0.2.0/conn.go:205 +0x2dd created by github.com/sourcegraph/jsonrpc2.NewConn in goroutine 1 github.com/sourcegraph/jsonrpc2@v0.2.0/conn.go:62 +0x1e6 [Error - 1:03:17 PM] Server process exited with code 2. [Info - 1:03:17 PM] Connection to server got closed. Server will restart. true 2025/01/20 13:03:17.836 DEBUG [C3-LSP.parser] No crash reports 2025/01/20 13:03:17.844 NOTE [C3-LSP] reading from stdin, writing to stdout 2025/01/20 13:03:17.844 INFO [C3-LSP] new stream connection 2025/01/20 13:03:17.844 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #0: initialize: {"capabilities":{"general":{"markdown":{"parser":"marked","version":"1.1.0"},"positionEncodings":["utf-16"],"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"staleRequestSupport":{"cancel":true,"retryOnContentModified":["textDocument/semanticTokens/full","textDocument/semanticTokens/range","textDocument/semanticTokens/full/delta"]}},"notebookDocument":{"synchronization":{"dynamicRegistration":true,"executionSummarySupport":true}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":true,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"labelDetailsSupport":true,"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"completionList":{"itemDefaults":["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]},"contextSupport":true,"dynamicRegistration":true,"insertTextMode":2},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"diagnostic":{"dynamicRegistration":true,"relatedDocumentSupport":false},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"foldingRange":{"collapsedText":false},"foldingRangeKind":{"valueSet":["comment","imports","region"]},"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"inlayHint":{"dynamicRegistration":true,"resolveSupport":{"properties":["tooltip","textEdits","label.tooltip","label.location","label.command"]}},"inlineValue":{"dynamicRegistration":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true,"rangesSupport":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"augmentsSyntaxTokens":true,"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"serverCancelSupport":true,"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"typeHierarchy":{"dynamicRegistration":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"diagnostics":{"refreshSupport":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"foldingRange":{"refreshSupport":true},"inlayHint":{"refreshSupport":true},"inlineValue":{"refreshSupport":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"resolveSupport":{"properties":["location.range"]},"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.96.4"},"locale":"en","processId":17493,"rootPath":null,"rootUri":null,"trace":"off","workspaceFolders":null} 2025/01/20 13:03:17.845 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #0: initialize: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":true},"completionProvider":{"triggerCharacters":[".",":"]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","],"retriggerCharacters":[")"]},"declarationProvider":true,"definitionProvider":true,"renameProvider":true,"workspace":{"fileOperations":{"didRename":{"filters":[{"pattern":{"glob":"**/*.{c3,c3i}"}}]},"didDelete":{"filters":[{"pattern":{"glob":"**/*.{c3,c3i}"}}]}}}},"serverInfo":{"name":"C3-LSP","version":"0.3.3"}} 2025/01/20 13:03:17.845 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: initialized: {} 2025/01/20 13:03:17.846 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didOpen: {"textDocument":{"languageId":"c3","text":"struct Foo\n{\n\tint a;\n\tint b;\n}\nstruct Bar\n{\n\tinline Foo\n}","uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":47}} panic: runtime error: index out of range [0] with length 0 goroutine 5 [running]: github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).parse_struct_body(0xc00096e640, 0xc000a972c0, 0xc00026b4a0, 0xc000a96c30, {0xc000916840, 0x39, 0x39}) github.com/pherrymason/c3-lsp/pkg/parser/node_to_struct.go:193 +0x1505 github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).nodeToStruct(_, _, _, _, {_, _, _}) github.com/pherrymason/c3-lsp/pkg/parser/node_to_struct.go:64 +0x44e github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).ParseSymbols(0xc00096e640, 0xc000a96c30) github.com/pherrymason/c3-lsp/pkg/parser/parser.go:146 +0x14ad github.com/pherrymason/c3-lsp/internal/lsp/project_state.(*ProjectState).RefreshDocumentIdentifiers(0xc00014ed00, 0xc000a96c30, 0xc000916840?) github.com/pherrymason/c3-lsp/internal/lsp/project_state/state.go:101 +0x32 github.com/pherrymason/c3-lsp/internal/lsp/server.(*Server).TextDocumentDidOpen(0xc00024a540, 0xc000a69e88?, 0xc000a69e60?) github.com/pherrymason/c3-lsp/internal/lsp/server/TextDocumentDidOpen.go:28 +0x69 github.com/tliron/glsp/protocol_3_16.(*Handler).Handle(0xc00016c600, 0xc000967450) github.com/tliron/glsp@v0.2.3-0.20240511204206-c63625272e79/protocol_3_16/handler.go:310 +0xd67 github.com/tliron/glsp/server.(*Server).handle(0xc0001366c0, {0x10461a0, 0xc0001b0000}, 0xc000188000, 0xc0002004e0) github.com/tliron/glsp@v0.2.3-0.20240511204206-c63625272e79/server/handler.go:47 +0x28c github.com/sourcegraph/jsonrpc2.(*HandlerWithErrorConfigurer).Handle(0xc00096e750, {0x10461a0, 0xc0001b0000}, 0xc000188000, 0xc0002004e0) github.com/sourcegraph/jsonrpc2@v0.2.0/handler_with_error.go:21 +0x57 github.com/sourcegraph/jsonrpc2.(*Conn).readMessages(0xc000188000, {0x10461a0, 0xc0001b0000}) github.com/sourcegraph/jsonrpc2@v0.2.0/conn.go:205 +0x2dd created by github.com/sourcegraph/jsonrpc2.NewConn in goroutine 1 github.com/sourcegraph/jsonrpc2@v0.2.0/conn.go:62 +0x1e6 [Error - 1:03:17 PM] Server process exited with code 2. [Info - 1:03:17 PM] Connection to server got closed. Server will restart. true 2025/01/20 13:03:17.865 DEBUG [C3-LSP.parser] No crash reports 2025/01/20 13:03:17.873 NOTE [C3-LSP] reading from stdin, writing to stdout 2025/01/20 13:03:17.873 INFO [C3-LSP] new stream connection 2025/01/20 13:03:17.874 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #0: initialize: {"capabilities":{"general":{"markdown":{"parser":"marked","version":"1.1.0"},"positionEncodings":["utf-16"],"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"staleRequestSupport":{"cancel":true,"retryOnContentModified":["textDocument/semanticTokens/full","textDocument/semanticTokens/range","textDocument/semanticTokens/full/delta"]}},"notebookDocument":{"synchronization":{"dynamicRegistration":true,"executionSummarySupport":true}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":true,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"labelDetailsSupport":true,"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"completionList":{"itemDefaults":["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]},"contextSupport":true,"dynamicRegistration":true,"insertTextMode":2},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"diagnostic":{"dynamicRegistration":true,"relatedDocumentSupport":false},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"foldingRange":{"collapsedText":false},"foldingRangeKind":{"valueSet":["comment","imports","region"]},"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"inlayHint":{"dynamicRegistration":true,"resolveSupport":{"properties":["tooltip","textEdits","label.tooltip","label.location","label.command"]}},"inlineValue":{"dynamicRegistration":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true,"rangesSupport":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"augmentsSyntaxTokens":true,"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"serverCancelSupport":true,"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"typeHierarchy":{"dynamicRegistration":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"diagnostics":{"refreshSupport":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"foldingRange":{"refreshSupport":true},"inlayHint":{"refreshSupport":true},"inlineValue":{"refreshSupport":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"resolveSupport":{"properties":["location.range"]},"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.96.4"},"locale":"en","processId":17493,"rootPath":null,"rootUri":null,"trace":"off","workspaceFolders":null} 2025/01/20 13:03:17.874 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #0: initialize: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":true},"completionProvider":{"triggerCharacters":[".",":"]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","],"retriggerCharacters":[")"]},"declarationProvider":true,"definitionProvider":true,"renameProvider":true,"workspace":{"fileOperations":{"didRename":{"filters":[{"pattern":{"glob":"**/*.{c3,c3i}"}}]},"didDelete":{"filters":[{"pattern":{"glob":"**/*.{c3,c3i}"}}]}}}},"serverInfo":{"name":"C3-LSP","version":"0.3.3"}} 2025/01/20 13:03:17.875 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: initialized: {} 2025/01/20 13:03:17.876 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didOpen: {"textDocument":{"languageId":"c3","text":"struct Foo\n{\n\tint a;\n\tint b;\n}\nstruct Bar\n{\n\tinline Foo\n}","uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":47}} panic: runtime error: index out of range [0] with length 0 goroutine 30 [running]: github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).parse_struct_body(0xc0009c9eb0, 0xc000a712c0, 0xc0001574a0, 0xc000a70c30, {0xc0009b6840, 0x39, 0x39}) github.com/pherrymason/c3-lsp/pkg/parser/node_to_struct.go:193 +0x1505 github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).nodeToStruct(_, _, _, _, {_, _, _}) github.com/pherrymason/c3-lsp/pkg/parser/node_to_struct.go:64 +0x44e github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).ParseSymbols(0xc0009c9eb0, 0xc000a70c30) github.com/pherrymason/c3-lsp/pkg/parser/parser.go:146 +0x14ad github.com/pherrymason/c3-lsp/internal/lsp/project_state.(*ProjectState).RefreshDocumentIdentifiers(0xc0000d2d00, 0xc000a70c30, 0xc0009b6840?) github.com/pherrymason/c3-lsp/internal/lsp/project_state/state.go:101 +0x32 github.com/pherrymason/c3-lsp/internal/lsp/server.(*Server).TextDocumentDidOpen(0xc000136540, 0xc000a7a028?, 0xc000a7a000?) github.com/pherrymason/c3-lsp/internal/lsp/server/TextDocumentDidOpen.go:28 +0x69 github.com/tliron/glsp/protocol_3_16.(*Handler).Handle(0xc0000e4600, 0xc0009cd450) github.com/tliron/glsp@v0.2.3-0.20240511204206-c63625272e79/protocol_3_16/handler.go:310 +0xd67 github.com/tliron/glsp/server.(*Server).handle(0xc0000a0720, {0x10461a0, 0xc0001a4000}, 0xc0000b8120, 0xc0002003c0) github.com/tliron/glsp@v0.2.3-0.20240511204206-c63625272e79/server/handler.go:47 +0x28c github.com/sourcegraph/jsonrpc2.(*HandlerWithErrorConfigurer).Handle(0xc0009e6040, {0x10461a0, 0xc0001a4000}, 0xc0000b8120, 0xc0002003c0) github.com/sourcegraph/jsonrpc2@v0.2.0/handler_with_error.go:21 +0x57 github.com/sourcegraph/jsonrpc2.(*Conn).readMessages(0xc0000b8120, {0x10461a0, 0xc0001a4000}) github.com/sourcegraph/jsonrpc2@v0.2.0/conn.go:205 +0x2dd created by github.com/sourcegraph/jsonrpc2.NewConn in goroutine 1 github.com/sourcegraph/jsonrpc2@v0.2.0/conn.go:62 +0x1e6 [Error - 1:03:17 PM] Server process exited with code 2. [Info - 1:03:17 PM] Connection to server got closed. Server will restart. true 2025/01/20 13:03:17.893 DEBUG [C3-LSP.parser] No crash reports 2025/01/20 13:03:17.900 NOTE [C3-LSP] reading from stdin, writing to stdout 2025/01/20 13:03:17.900 INFO [C3-LSP] new stream connection 2025/01/20 13:03:17.901 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #0: initialize: {"capabilities":{"general":{"markdown":{"parser":"marked","version":"1.1.0"},"positionEncodings":["utf-16"],"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"staleRequestSupport":{"cancel":true,"retryOnContentModified":["textDocument/semanticTokens/full","textDocument/semanticTokens/range","textDocument/semanticTokens/full/delta"]}},"notebookDocument":{"synchronization":{"dynamicRegistration":true,"executionSummarySupport":true}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":true,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"labelDetailsSupport":true,"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"completionList":{"itemDefaults":["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]},"contextSupport":true,"dynamicRegistration":true,"insertTextMode":2},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"diagnostic":{"dynamicRegistration":true,"relatedDocumentSupport":false},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"foldingRange":{"collapsedText":false},"foldingRangeKind":{"valueSet":["comment","imports","region"]},"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"inlayHint":{"dynamicRegistration":true,"resolveSupport":{"properties":["tooltip","textEdits","label.tooltip","label.location","label.command"]}},"inlineValue":{"dynamicRegistration":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true,"rangesSupport":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"augmentsSyntaxTokens":true,"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"serverCancelSupport":true,"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"typeHierarchy":{"dynamicRegistration":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"diagnostics":{"refreshSupport":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"foldingRange":{"refreshSupport":true},"inlayHint":{"refreshSupport":true},"inlineValue":{"refreshSupport":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"resolveSupport":{"properties":["location.range"]},"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.96.4"},"locale":"en","processId":17493,"rootPath":null,"rootUri":null,"trace":"off","workspaceFolders":null} 2025/01/20 13:03:17.901 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #0: initialize: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":true},"completionProvider":{"triggerCharacters":[".",":"]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","],"retriggerCharacters":[")"]},"declarationProvider":true,"definitionProvider":true,"renameProvider":true,"workspace":{"fileOperations":{"didRename":{"filters":[{"pattern":{"glob":"**/*.{c3,c3i}"}}]},"didDelete":{"filters":[{"pattern":{"glob":"**/*.{c3,c3i}"}}]}}}},"serverInfo":{"name":"C3-LSP","version":"0.3.3"}} 2025/01/20 13:03:17.902 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: initialized: {} 2025/01/20 13:03:17.902 DEBUG [C3-LSP:rpc] jsonrpc2: --> notif: textDocument/didOpen: {"textDocument":{"languageId":"c3","text":"struct Foo\n{\n\tint a;\n\tint b;\n}\nstruct Bar\n{\n\tinline Foo\n}","uri":"file:///home/ranthos/Code/programming-languages/c3/test.c3","version":47}} panic: runtime error: index out of range [0] with length 0 goroutine 42 [running]: github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).parse_struct_body(0xc0009cc600, 0xc000a612c0, 0xc0007154a0, 0xc000a60c30, {0xc000986800, 0x39, 0x39}) github.com/pherrymason/c3-lsp/pkg/parser/node_to_struct.go:193 +0x1505 github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).nodeToStruct(_, _, _, _, {_, _, _}) github.com/pherrymason/c3-lsp/pkg/parser/node_to_struct.go:64 +0x44e github.com/pherrymason/c3-lsp/pkg/parser.(*Parser).ParseSymbols(0xc0009cc600, 0xc000a60c30) github.com/pherrymason/c3-lsp/pkg/parser/parser.go:146 +0x14ad github.com/pherrymason/c3-lsp/internal/lsp/project_state.(*ProjectState).RefreshDocumentIdentifiers(0xc000150d00, 0xc000a60c30, 0xc000986800?) github.com/pherrymason/c3-lsp/internal/lsp/project_state/state.go:101 +0x32 github.com/pherrymason/c3-lsp/internal/lsp/server.(*Server).TextDocumentDidOpen(0xc000872540, 0xc000a35f18?, 0xc000a35ef0?) github.com/pherrymason/c3-lsp/internal/lsp/server/TextDocumentDidOpen.go:28 +0x69 github.com/tliron/glsp/protocol_3_16.(*Handler).Handle(0xc00016e600, 0xc0009c7450) github.com/tliron/glsp@v0.2.3-0.20240511204206-c63625272e79/protocol_3_16/handler.go:310 +0xd67 github.com/tliron/glsp/server.(*Server).handle(0xc0001386c0, {0x10461a0, 0xc0001b0000}, 0xc000122090, 0xc0001384e0) github.com/tliron/glsp@v0.2.3-0.20240511204206-c63625272e79/server/handler.go:47 +0x28c github.com/sourcegraph/jsonrpc2.(*HandlerWithErrorConfigurer).Handle(0xc0009cc710, {0x10461a0, 0xc0001b0000}, 0xc000122090, 0xc0001384e0) github.com/sourcegraph/jsonrpc2@v0.2.0/handler_with_error.go:21 +0x57 github.com/sourcegraph/jsonrpc2.(*Conn).readMessages(0xc000122090, {0x10461a0, 0xc0001b0000}) github.com/sourcegraph/jsonrpc2@v0.2.0/conn.go:205 +0x2dd created by github.com/sourcegraph/jsonrpc2.NewConn in goroutine 1 github.com/sourcegraph/jsonrpc2@v0.2.0/conn.go:62 +0x1e6 [Error - 1:03:17 PM] Server process exited with code 2. [Error - 1:03:17 PM] The C3LSP server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
The text was updated successfully, but these errors were encountered:
Applied fix in next version: #e299a4411626a3c61942bf464d2856a29fb0d5af
Sorry, something went wrong.
e628c5a
I've properly fixed it in main branch too so you don't need to wait for 0.4 to release. You can download the binary for your OS here: https://github.com/pherrymason/c3-lsp/actions/runs/12902773212/artifacts/2466185923
No branches or pull requests
Describe the bug
If a struct contains an inline struct without a member name, the LSP crashes and does not restart.
To Reproduce
Steps to reproduce the behavior:
Bar
, typeinline Foo foo;
inline Foo
.Expected behavior
I was expecting the LSP to keep running as normal.
Screenshots
N/A
Desktop:
Additional context
Here is the output from C3LSP as shown in VS code:
The text was updated successfully, but these errors were encountered: