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 dce8a0c commit 5ddb575Copy full SHA for 5ddb575
src/luasm.lua
@@ -186,8 +186,13 @@ function instruction:parse(elements, luasm)
186
187
local args = {}
188
for i = 2, #elements do
189
- -- TODO: If structure element does not exist in settings
190
- local arg = elements[i]:match(luasm.settings.syntax[expected[i - 1]])
+ local pattern = luasm.settings.syntax[expected[i - 1]]
+ if pattern == nil then
191
+ error("The pattern with the name of '" .. expected[i - 1] .. "' does not exist.", 2)
192
+ return "Pattern not found"
193
+ end
194
+
195
+ local arg = elements[i]:match(pattern)
196
if arg == nil then
197
local err = string.format(
198
"Could not match argument '%s' (expected %s)",
0 commit comments