1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-07 21:25:14 +00:00

Makes sure only vars and arrays are added

This commit is contained in:
Fellippe Heitor 2021-07-16 02:26:14 -03:00
parent e95e8a4825
commit df56b030f1

View file

@ -18355,27 +18355,29 @@ FUNCTION findid& (n2$)
id = ids(i) id = ids(i)
t = id.t t = id.t
IF t = 0 THEN IF id.subfunc = 0 THEN
t = id.arraytype IF t = 0 THEN
IF t AND ISUDT THEN t = id.arraytype
manageVariableList "", scope$ + "ARRAY_UDT_" + RTRIM$(id.n), 1 IF t AND ISUDT THEN
ELSE manageVariableList "", scope$ + "ARRAY_UDT_" + RTRIM$(id.n), 1
n$ = id2shorttypename$
IF LEFT$(n$, 1) = "_" THEN
manageVariableList "", scope$ + "ARRAY" + n$ + "_" + RTRIM$(id.n), 2
ELSE ELSE
manageVariableList "", scope$ + "ARRAY_" + n$ + "_" + RTRIM$(id.n), 3 n$ = id2shorttypename$
IF LEFT$(n$, 1) = "_" THEN
manageVariableList "", scope$ + "ARRAY" + n$ + "_" + RTRIM$(id.n), 2
ELSE
manageVariableList "", scope$ + "ARRAY_" + n$ + "_" + RTRIM$(id.n), 3
END IF
END IF END IF
END IF
ELSE
IF t AND ISUDT THEN
manageVariableList "", scope$ + "UDT_" + RTRIM$(id.n), 4
ELSE ELSE
n$ = id2shorttypename$ IF t AND ISUDT THEN
IF LEFT$(n$, 1) = "_" THEN manageVariableList "", scope$ + "UDT_" + RTRIM$(id.n), 4
manageVariableList "", scope$ + MID$(n$, 2) + "_" + RTRIM$(id.n), 5
ELSE ELSE
manageVariableList "", scope$ + n$ + "_" + RTRIM$(id.n), 6 n$ = id2shorttypename$
IF LEFT$(n$, 1) = "_" THEN
manageVariableList "", scope$ + MID$(n$, 2) + "_" + RTRIM$(id.n), 5
ELSE
manageVariableList "", scope$ + n$ + "_" + RTRIM$(id.n), 6
END IF
END IF END IF
END IF END IF
END IF END IF