auto-recognize RECALL characters
Although this is not a core macro (yet - I've been meaning to ask why Wesnoth doesn't have core recall macros), it is used in many UMC projects in a consistent format, making it a de-facto standard. Test that the macro has only one field, to make sure it isn't deviating from the format.
This commit is contained in:
parent
6dde83c3ac
commit
39557e8807
1 changed files with 4 additions and 0 deletions
|
@ -1457,6 +1457,10 @@ def global_sanity_check(filename, lines):
|
|||
re.match(r'([0-9]+|[^\s]*\$[^\s]*y[^\s]*|{[^\s]*Y[^\s]*})$', args[4]) and \
|
||||
len(args[5]) > 0:
|
||||
present.append(args[5])
|
||||
elif macname == 'RECALL':
|
||||
(args, brack, paren) = parse_macroref(0, leadmac.string)
|
||||
if len(args) == 2 and brack == 0:
|
||||
present.append(args[1])
|
||||
# Recognize macro pairings from "wmllint: who" magic
|
||||
# comments.
|
||||
for mac in whopairs.keys():
|
||||
|
|
Loading…
Add table
Reference in a new issue