Make "global" a legal actual value for arguments of type SIDE.
This commit is contained in:
parent
5b8732dcda
commit
c1eb8ff6bd
1 changed files with 5 additions and 1 deletions
|
@ -149,7 +149,9 @@ def formaltype(f):
|
|||
# Deduce the expected type of the formal
|
||||
if f.startswith("_"):
|
||||
f = f[1:]
|
||||
if f in ("SIDE", "X", "Y", "RED", "GREEN", "BLUE", "TURN", "PROB", "LAYER", "TIME") or f.endswith("_SIDE") or f.endswith("NUMBER") or f.endswith("AMOUNT") or f.endswith("COST") or f.endswith("RADIUS") or f.endswith("_X") or f.endswith("_Y") or f.endswith("_INCREMENT") or f.endswith("_FACTOR") or f.endswith("_TIME") or f.endswith("_SIZE"):
|
||||
if f == "SIDE" or f.endswith("_SIDE"):
|
||||
ftype = "side"
|
||||
elif f in ("SIDE", "X", "Y", "RED", "GREEN", "BLUE", "TURN", "PROB", "LAYER", "TIME") or f.endswith("NUMBER") or f.endswith("AMOUNT") or f.endswith("COST") or f.endswith("RADIUS") or f.endswith("_X") or f.endswith("_Y") or f.endswith("_INCREMENT") or f.endswith("_FACTOR") or f.endswith("_TIME") or f.endswith("_SIZE"):
|
||||
ftype = "numeric"
|
||||
elif f in ("POSITION",) or f.endswith("_POSITION") or f == "BASE":
|
||||
ftype = "position"
|
||||
|
@ -238,6 +240,8 @@ def argmatch(formals, actuals):
|
|||
atype = actualtype(a)
|
||||
if ftype == "any":
|
||||
pass
|
||||
elif (atype == "numeric" or a == "global") and ftype == "side":
|
||||
pass
|
||||
elif atype in ("filter", "empty") and ftype == "wml":
|
||||
pass
|
||||
elif atype in ("numeric", "position") and ftype == "span":
|
||||
|
|
Loading…
Add table
Reference in a new issue