Fixed error message, added another convenience accessor.
This commit is contained in:
parent
2cf8a96c70
commit
2dc9d24a5f
4
core.nom
4
core.nom
@ -182,13 +182,13 @@ rule ["max of %items with respect to %keys"]:
|
||||
|
||||
macro [..]
|
||||
"%list 's %index", "%index st in %list", "%index nd in %list", "%index rd in %list"
|
||||
"%index th in %list"
|
||||
"%index th in %list", "%index in %list"
|
||||
..:
|
||||
".."|\%list as lua expr\[\%index as lua expr\]
|
||||
|
||||
macro block [..]
|
||||
"%list 's %index = %value", "%index st in %list = %value", "%index nd in %list = %value"
|
||||
"%index rd in %list = %value", "%index th in %list = %value"
|
||||
"%index rd in %list = %value", "%index th in %list = %value", "%index in %list = %value"
|
||||
..:
|
||||
".."|\%list as lua expr\[\%index as lua expr\] = \%value as lua expr\
|
||||
|
||||
|
@ -223,7 +223,7 @@ do
|
||||
table.insert(invocations, invocation)
|
||||
if prev_arg_names then
|
||||
if not utils.equivalent(utils.set(prev_arg_names), utils.set(_arg_names)) then
|
||||
self:error("Conflicting argument names " .. tostring(utils.repr(arg_names)) .. " and " .. tostring(utils.repr(_arg_names)) .. " for " .. tostring(utils.repr(text)))
|
||||
self:error("Conflicting argument names " .. tostring(utils.repr(prev_arg_names)) .. " and " .. tostring(utils.repr(_arg_names)) .. " for " .. tostring(utils.repr(text)))
|
||||
end
|
||||
else
|
||||
prev_arg_names = _arg_names
|
||||
|
@ -144,7 +144,7 @@ class NomsuCompiler
|
||||
table.insert(invocations, invocation)
|
||||
if prev_arg_names
|
||||
if not utils.equivalent(utils.set(prev_arg_names), utils.set(_arg_names))
|
||||
@error("Conflicting argument names #{utils.repr(arg_names)} and #{utils.repr(_arg_names)} for #{utils.repr(text)}")
|
||||
@error("Conflicting argument names #{utils.repr(prev_arg_names)} and #{utils.repr(_arg_names)} for #{utils.repr(text)}")
|
||||
else prev_arg_names = _arg_names
|
||||
arg_names[invocation] = _arg_names
|
||||
return invocations, arg_names
|
||||
|
Loading…
Reference in New Issue
Block a user