Initial draft of interpreter. Lua compiled "chunks" can be unmarshalled. Approximately half of bytecodes implemented in some form or another.
This commit is contained in:
8
src/test/res/test4.lua
Normal file
8
src/test/res/test4.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
function Point(x, y) -- "Point" object constructor
|
||||
return { x = x, y = y } -- Creates and returns a new object (table)
|
||||
end
|
||||
array = { Point(10, 20), Point(30, 40), Point(50, 60) } -- Creates array of points
|
||||
print(array[2].y) -- Prints 40
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user