mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-20 10:25:15 +00:00
Begins changing warning system to consider includes.
This commit is contained in:
parent
aef35c96e1
commit
1e11ff17b6
|
@ -25162,7 +25162,7 @@ SUB manageVariableList (name$, __cname$, action AS _BYTE)
|
||||||
s$ = CHR$(4) + MKI$(LEN(cname$)) + cname$ + CHR$(5)
|
s$ = CHR$(4) + MKI$(LEN(cname$)) + cname$ + CHR$(5)
|
||||||
IF INSTR(usedVariableList$, s$) = 0 THEN
|
IF INSTR(usedVariableList$, s$) = 0 THEN
|
||||||
ASC(s$, 1) = 3
|
ASC(s$, 1) = 3
|
||||||
usedVariableList$ = usedVariableList$ + CHR$(1) + MKL$(linenumber) + CHR$(2)
|
usedVariableList$ = usedVariableList$ + CHR$(1) + MKL$(linenumber) + MKL$(inclevel) + MKL$(inclinenumber(inclevel)) + incname$(inclevel) + CHR$(2)
|
||||||
usedVariableList$ = usedVariableList$ + "VAR:" + s$ + name$ + CHR$(10)
|
usedVariableList$ = usedVariableList$ + "VAR:" + s$ + name$ + CHR$(10)
|
||||||
totalUnusedVariables = totalUnusedVariables + 1
|
totalUnusedVariables = totalUnusedVariables + 1
|
||||||
'warning$(1) = warning$(1) + "Adding " + cname$ + " at line" + STR$(linenumber) + CHR$(10)
|
'warning$(1) = warning$(1) + "Adding " + cname$ + " at line" + STR$(linenumber) + CHR$(10)
|
||||||
|
@ -25180,6 +25180,18 @@ END SUB
|
||||||
|
|
||||||
SUB addWarning (lineNumber AS LONG, text$)
|
SUB addWarning (lineNumber AS LONG, text$)
|
||||||
IF NOT IgnoreWarnings THEN
|
IF NOT IgnoreWarnings THEN
|
||||||
|
IF idemode = 0 THEN
|
||||||
|
PRINT
|
||||||
|
IF lineNumber = 0 THEN
|
||||||
|
PRINT "Warning: "; text$;
|
||||||
|
ELSE
|
||||||
|
IF VerboseMode THEN
|
||||||
|
PRINT "; "; text$; " (line"; STR$(lineNumber); ")"
|
||||||
|
ELSE
|
||||||
|
PRINT " (line"; STR$(lineNumber); ")"
|
||||||
|
END IF
|
||||||
|
END IF
|
||||||
|
ELSE
|
||||||
IF lineNumber > 0 THEN
|
IF lineNumber > 0 THEN
|
||||||
totalWarnings = totalWarnings + 1
|
totalWarnings = totalWarnings + 1
|
||||||
ELSE
|
ELSE
|
||||||
|
@ -25192,7 +25204,8 @@ SUB addWarning (lineNumber AS LONG, text$)
|
||||||
|
|
||||||
warningListItems = warningListItems + 1
|
warningListItems = warningListItems + 1
|
||||||
IF warningListItems > UBOUND(warning$) THEN REDIM _PRESERVE warning$(warningListItems + 999)
|
IF warningListItems > UBOUND(warning$) THEN REDIM _PRESERVE warning$(warningListItems + 999)
|
||||||
warning$(warningListItems) = MKL$(lineNumber) + text$
|
warning$(warningListItems) = MKL$(lineNumber) + MKL$(inclevel) + MKL$(inclinenumber(inclevel)) + incname$(inclevel) + CHR$(2) + text$
|
||||||
|
END IF
|
||||||
END IF
|
END IF
|
||||||
END SUB
|
END SUB
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue