Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/01_inline_parsing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ start: mov 10 r0
add r0 r1
jmp start
]]
local tokenizer = LuASM.string_tokenizer(src)
local tokenizer = asm:string_tokenizer(src)

-- 4. Parse
local result = asm:parse(tokenizer)
Expand Down
2 changes: 1 addition & 1 deletion examples/02_file_parsing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local instructions = {
local asm = LuASM:new(instructions, {})

-- 3. Tokenize a source string
local tokenizer = LuASM.file_tokenizer("./data/02_data.lasm")
local tokenizer = asm:file_tokenizer("./data/02_data.lasm")

-- 4. Parse
local result = asm:parse(tokenizer)
Expand Down
2 changes: 1 addition & 1 deletion examples/03_custom_arguments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ local src = [[
mov reg0, reg1
print "Hello"
]]
local tokenizer = LuASM.string_tokenizer(src)
local tokenizer = asm:string_tokenizer(src)

-- 4. Parse
local result = asm:parse(tokenizer)
Expand Down
2 changes: 1 addition & 1 deletion examples/04_interpreter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ print "Hello"
print "World"
print "Message"
]]
local tokenizer = LuASM.string_tokenizer(src)
local tokenizer = asm:string_tokenizer(src)

-- 4. Parse
local result = asm:parse(tokenizer)
Expand Down
2 changes: 1 addition & 1 deletion examples/05_comments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ start: mov 10 r0 # This is a comment
add r0 r1 ; This is another comment
jmp start
]]
local tokenizer = LuASM.string_tokenizer(src)
local tokenizer = asm:string_tokenizer(src)

-- 4. Parse
local result = asm:parse(tokenizer)
Expand Down
2 changes: 1 addition & 1 deletion examples/06_custom_comments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ start: mov 10 r0 = My custom comment
add r0 r1 = This just works
jmp start
]]
local tokenizer = LuASM.string_tokenizer(src)
local tokenizer = asm:string_tokenizer(src)

-- 4. Parse
local result = asm:parse(tokenizer)
Expand Down
Loading