<commit_before>local symtab = {}

symtab.__index = symtab

function symtab.new()
    return setmetatable({ blocks = { {} } }, symtab)
end

function symtab:open_block()
    table.insert(self.blocks, {})
end

function symtab:close_block()
    local last = self.blocks[#self.blocks]
    table.remove(self.blocks)
end

function symtab:with_block(body, ...)
    self:open_block()
    local res = body(...)
    self:close_block()
    return res
end

function symtab:add_symbol(name, decl)
    assert(#self.blocks > 0, "no blocks")
    local block = self.blocks
    block[#block][name] = decl
end

function symtab:find_symbol(name)
    local decl<commit_msg>Remove unused variable declaration<commit_after>local symtab = {}

symtab.__index = symtab

function symtab.new()
    return setmetatable({ blocks = { {} } }, symtab)
end

function symtab:open_block()
    table.insert(self.blocks, {})
end

function symtab:close_block()
    table.remove(self.blocks)
end

function symtab:with_block(body, ...)
    self:open_block()
    local res = body(...)
    self:close_block()
    return res
end

function symtab:add_symbol(name, decl)
    assert(#self.blocks > 0, "no blocks")
    local block = self.blocks
    block[#block][name] = decl
end

function symtab:find_symbol(name)
    local decl
{'fraction_non_alphanumeric': 0.1296875, 'fraction_numerical': 0.0015625, 'mean_word_length': 3.8893129770992365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '632227', 'n_tokens_mistral': 426, 'n_tokens_neox': 439, 'n_words': 97}