GDScript: Fix LSP getting wrong union value on unnamed enums

This commit is contained in:
George Marques 2020-08-17 21:10:30 -03:00
parent d06ce2f11e
commit fda6f3b600
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D

View file

@ -237,7 +237,7 @@ void ExtendGDScriptParser::parse_class_symbol(const GDScriptParser::ClassNode *p
case ClassNode::Member::ENUM_VALUE: {
lsp::DocumentSymbol symbol;
symbol.name = m.constant->identifier->name;
symbol.name = m.enum_value.identifier->name;
symbol.kind = lsp::SymbolKind::EnumMember;
symbol.deprecated = false;
symbol.range.start.line = LINE_NUMBER_TO_INDEX(m.enum_value.line);