Calling a function with self?

I have a module, and I want to call a function and pass in arguments with it, but whenever I do, the arguments are nil.

function interpreter:visit()
	for _, node in pairs(self.ast) do
		self[node[1]](node)
        print(node) --prints correctly
	end
end

function interpreter:VAR_DECLARE_NODE(node)
	local var = setmetatable({}, {})
	
	var.name = node[2][1] --error because node is nil (attempt to index nil with number)
	var.value = node[2][2] --^
	
	return var
end

Are you sure that node is nil, and not node[2]?

Yes.
image

Nevermind, found the solution. You have to add self then the arguments you want to pass.

self[node[1]](self, node)