Skip to content

Commit 6411ea3

Browse files
committed
Improve heuristic for detecting named instantiations
Yes, this is merely a heuristic. For example, `.local == .other` would still trip it, but at least you can prevent it by wrapping the expression in parentheses.
1 parent 32e685b commit 6411ea3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

structs.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ MACRO dstruct ; struct_type, instance_name[, ...]
206206
; there because that would require a duplicated `ELSE`).
207207
DEF IS_NAMED_INSTANTIATION = 0
208208
IF _NARG > 2
209-
REDEF IS_NAMED_INSTANTIATION = STRIN("\3", "=")
209+
DEF IS_NAMED_INSTANTIATION = !STRCMP(STRSUB("\3", 1, 1), ".") && STRIN("\3", "=")
210210
ENDC
211211
212212
IF IS_NAMED_INSTANTIATION

0 commit comments

Comments
 (0)