#pragma once
#include "./types.hpp"
#include "../../../language/symbol/table.hpp"

namespace lsp::service::symbol
{
    FileSymbolIndex BuildFromEditingTable(const EditingSymbolTable& editing_table);
    void ExtractSymbols(FileSymbolIndex& index, const language::symbol::SymbolTable& table);
    void ExtractUnitSymbols(FileSymbolIndex& index, const language::symbol::SymbolTable& table, const std::vector<const language::symbol::SymbolDefinition*>& all_defs);
    void ExtractClassSymbols(FileSymbolIndex& index, const language::symbol::SymbolTable& table, const std::vector<const language::symbol::SymbolDefinition*>& all_defs);
    void ExtractFunctionSymbols(FileSymbolIndex& index, const language::symbol::SymbolTable& table, const std::vector<const language::symbol::SymbolDefinition*>& all_defs);
    void ExtractScriptSymbols(FileSymbolIndex& index, const language::symbol::SymbolTable& table, const std::vector<const language::symbol::SymbolDefinition*>& all_defs);
    std::vector<symbol::Parameter> ExtractFunctionParameters(const language::symbol::SymbolTable& table, language::symbol::SymbolId function_id);
}
