fix indentation issues
This commit is contained in:
parent
d86cec723e
commit
86d380a67e
13
CoreWords.tl
13
CoreWords.tl
|
@ -1,6 +1,19 @@
|
||||||
local Dict = require("Dictionary")
|
local Dict = require("Dictionary")
|
||||||
local Stack = require("Stack")
|
local Stack = require("Stack")
|
||||||
|
|
||||||
|
function add(stack: Stack)
|
||||||
|
local a: any =stack:pop()
|
||||||
|
local b: any=stack:pop()
|
||||||
|
if a is number and b is number then
|
||||||
|
local c=a+b
|
||||||
|
stack:push(c)
|
||||||
|
else
|
||||||
|
error("invalid operands for add operation!")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function dot(s: Stack)
|
||||||
|
print(s:pop())
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue