We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49272ed commit 4c672c6Copy full SHA for 4c672c6
src/luasm.lua
@@ -37,6 +37,7 @@ function LuASM:new(instructions, settings)
37
setmetatable(settings, { __index = {
38
separator = "[^,%s]+",
39
label = "^([%a]+):%s*(.*)",
40
+ comment = "[;#].*$",
41
syntax = {
42
imm = "^[%d]+",
43
reg = "^%a[%w]*",
@@ -228,6 +229,11 @@ function LuASM:parse(tokenizer)
228
229
230
if token ~= nil then
231
232
+ -- Remove comments
233
+ if self.settings.comment ~= nil then
234
+ token = token:gsub(self.settings.comment, "")
235
+ end
236
+
237
--[[
238
This is very basic label processing as labels could be
239
nested and there could be priorities assigned with labels.
0 commit comments