Interpreter stops working when I change valid operator

So as a little side project, I wanted to make this accumulator with odd syntax, but when I change the valid operators, it doesn’t work.

Module script, in ReplicatedStorage:

local Uhoh = {  }


local items = {
	zero = { key = "#", value = "0" },
	add = { key = "+", value = "+ 1" },
	sub = { key = "-", value = "- 1" }
}

local operators = {
	items.add.key,
	items.sub.key
}

local function find(tab: { any }, value: any)
	for i, v in pairs(tab) do
		if v == value then
			return true
		end
	end
	
	return false
end

function Uhoh.interpret(source)
	local accum = ""	
	local op = ""
	local numb = ""
	
	local cleanedSrc = source:gsub(items.zero.key, items.zero.value):gsub(items.add.key, items.add.value):gsub(items.sub.key, items.sub.value)
	
	local i = 1
	
	for c in cleanedSrc:gmatch(".") do		
		if i == 1 then
			accum = c
		elseif find(operators, c) then
			op = c
		elseif c == "1" then
			numb = c
			
			if op == operators[1] then
				accum += numb
			elseif op == operators[2] then
				accum -= numb
			end
		end
		
		i += 1
	end
	
	return accum
end

return Uhoh

Server script, in ServerScriptService:

local uhoh = require(game.ReplicatedStorage.UhOh)

print(uhoh.interpret("#+"))

The current set up will print out 1 in the output, but if I change the code like so:

Module script, in ReplicatedStorage:

local Uhoh = {  }


local items = {
	zero = { key = "#", value = "0" },
	add = { key = "!", value = "+ 1" }, --// New operator is just an example
	sub = { key = "-", value = "- 1" }
}

local operators = {
	items.add.key,
	items.sub.key
}

local function find(tab: { any }, value: any)
	for i, v in pairs(tab) do
		if v == value then
			return true
		end
	end
	
	return false
end

function Uhoh.interpret(source)
	local accum = ""	
	local op = ""
	local numb = ""
	
	local cleanedSrc = source:gsub(items.zero.key, items.zero.value):gsub(items.add.key, items.add.value):gsub(items.sub.key, items.sub.value)
	
	local i = 1
	
	for c in cleanedSrc:gmatch(".") do		
		if i == 1 then
			accum = c
		elseif find(operators, c) then
			op = c
		elseif c == "1" then
			numb = c
			
			if op == operators[1] then
				accum += numb
			elseif op == operators[2] then
				accum -= numb
			end
		end
		
		i += 1
	end
	
	return accum
end

return Uhoh

Server script, in ServerScriptService:

local uhoh = require(game.ReplicatedStorage.UhOh)

print(uhoh.interpret("#!"))

It will print out 0 for some reason that I don’t quite understand.

Any help is appreciated!

Yes, it’s supposed to be a parody of the BrainFrick programming language. (Am I allowed to use curse words?)

So I figured it out my self, it was a simple mistake, what I did was is I went to the operators table and made the values + and -, before hand if I had a custom key for the add item, the operators table would include that in the list of valid operators, because we are looking through character inside the cleaned source, which is just the source but the custom operators are converted to something the accumulator can read, the characters would never actually be what they are in the operators table.

If you understood that, wow, I barely can and I wrote it lol.

EDIT: No, it didn’t work. If I tried to use some custom operators, it would just register multiple uses of it, as just one, so if $ was the + operator, then #$$$ would output 1, for no reason.