mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 21:43:27 +00:00
Make dynasm accept labels and stmts on same line
Now accepts e.g.: 1: jmp <1 Used to be a parse error.
This commit is contained in:
parent
97813fb924
commit
64c4d0f8b5
@ -861,6 +861,10 @@ local function doline(line)
|
|||||||
-- Strip assembler comments.
|
-- Strip assembler comments.
|
||||||
aline = gsub(aline, "//.*$", "")
|
aline = gsub(aline, "//.*$", "")
|
||||||
|
|
||||||
|
-- Process and remove labels.
|
||||||
|
for stmt in gmatch(aline, "[^:]+:") do dostmt(stmt) end
|
||||||
|
aline = gsub(aline, "[^:]+:", "")
|
||||||
|
|
||||||
-- Split line into statements at semicolons.
|
-- Split line into statements at semicolons.
|
||||||
if match(aline, ";") then
|
if match(aline, ";") then
|
||||||
for stmt in gmatch(aline, "[^;]+") do dostmt(stmt) end
|
for stmt in gmatch(aline, "[^;]+") do dostmt(stmt) end
|
||||||
|
Loading…
Reference in New Issue
Block a user