Skip to content

Commit 9e78ea3

Browse files
Merge pull request #548 from QB64-Phoenix-Edition/deprecation-finetuning
Finalize $NOPREFIX deprecation
2 parents 8a5d77f + 49acd20 commit 9e78ea3

20 files changed

+178
-91
lines changed

source/qb64pe.bas

+12-31
Original file line numberDiff line numberDiff line change
@@ -1643,6 +1643,11 @@ DO
16431643
END IF
16441644
END IF
16451645

1646+
IF temp$ = "$NOPREFIX" THEN
1647+
a$ = "$NOPREFIX is a deprecated feature, QB64(PE) specific keywords MUST have the underscore"
1648+
GOTO errmes
1649+
END IF
1650+
16461651
IF LEFT$(temp$, 7) = "$ERROR " THEN
16471652
temp$ = RemoveStringEnclosingPair(LTRIM$(MID$(temp$, 7)), METACOMMAND_STRING_ENCLOSING_PAIR)
16481653
a$ = "Compilation check failed: " + temp$
@@ -1712,6 +1717,11 @@ DO
17121717
END SELECT
17131718
END IF
17141719

1720+
IF LEFT$(temp$, 15) = "$MIDISOUNDFONT:" THEN
1721+
a$ = "$MIDISOUNDFONT is a deprecated keyword, use _MIDISOUNDBANK instead"
1722+
GOTO errmes
1723+
END IF
1724+
17151725
wholeline$ = lineformat(wholeline$)
17161726
IF Error_Happened THEN GOTO errmes
17171727

@@ -2958,32 +2968,12 @@ DO
29582968
GOTO finishednonexec
29592969
END IF
29602970

2961-
IF a3u$ = "$NOPREFIX" THEN
2962-
'Deprecated; does nothing.
2963-
layout$ = SCase$("$NoPrefix")
2964-
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Deprecated feature", "$NOPREFIX"
2965-
GOTO finishednonexec
2966-
END IF
2967-
29682971
IF a3u$ = "$INCLUDEONCE" THEN
29692972
'just to catch it as keyword
29702973
layout$ = SCase$("$IncludeOnce")
29712974
GOTO finishednonexec
29722975
END IF
29732976

2974-
IF a3u$ = "$VIRTUALKEYBOARD:ON" THEN
2975-
'Deprecated; does nothing.
2976-
layout$ = SCase$("$VirtualKeyboard:On")
2977-
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Deprecated feature", "$VIRTUALKEYBOARD"
2978-
GOTO finishednonexec
2979-
END IF
2980-
IF a3u$ = "$VIRTUALKEYBOARD:OFF" THEN
2981-
'Deprecated; does nothing.
2982-
layout$ = SCase$("$VirtualKeyboard:Off")
2983-
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Deprecated feature", "$VIRTUALKEYBOARD"
2984-
GOTO finishednonexec
2985-
END IF
2986-
29872977
IF a3u$ = "$DEBUG" THEN
29882978
layout$ = SCase$("$Debug")
29892979
IF NoIDEMode THEN
@@ -3213,7 +3203,7 @@ DO
32133203
FOR i = 2 TO LEN(EmbedHandle$)
32143204
SELECT CASE ASC(EmbedHandle$, i)
32153205
CASE 0 TO 47, 58 TO 64, 91 TO 96, 123 TO 255
3216-
a$ = "Embed-Handle '" + EmbedHandle$ + "' has invalid chars, use A-Z/a-z/0-9 only": GOTO errmes
3206+
a$ = "Embed-Handle '" + EmbedHandle$ + "' has invalid chars, use Aa-Zz/0-9 only": GOTO errmes
32173207
END SELECT
32183208
NEXT i
32193209
'check for duplicate definitions
@@ -3305,7 +3295,7 @@ DO
33053295
SELECT CASE token$
33063296
CASE "MIDI"
33073297
layout$ = layout$ + SCase$("Midi")
3308-
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Deprecated feature, use _MIDISOUNDBANK instead", "$UNSTABLE:MIDI"
3298+
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "No longer required, feature is stable now", "$UNSTABLE:MIDI"
33093299

33103300
CASE "HTTP"
33113301
layout$ = layout$ + SCase$("Http")
@@ -3314,15 +3304,6 @@ DO
33143304
GOTO finishednonexec
33153305
END IF
33163306

3317-
IF unstableFlags(UNSTABLE_MIDI) THEN
3318-
IF LEFT$(a3u$, 15) = "$MIDISOUNDFONT:" THEN
3319-
layout$ = SCase$("$MIDISoundFont:") + MID$(a3$, 16)
3320-
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Deprecated feature, use _MIDISOUNDBANK instead", "$MIDISOUNDFONT"
3321-
3322-
GOTO finishednonexec
3323-
END IF
3324-
END IF
3325-
33263307
END IF 'QB64 Metacommands
33273308

33283309
IF ExecLevel(ExecCounter) THEN

source/subs_functions/syntax_highlighter_list.bas

+163-8
Large diffs are not rendered by default.

tests/compile_tests/console_only/midi.bas

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ $CONSOLE:ONLY
22
_DEST _CONSOLE
33
CHDIR _STARTDIR$
44

5-
$Unstable: Midi
6-
$MidiSoundFont: Default
5+
_MIDISOUNDBANK "./test-soundfont.sf2"
76

8-
handle = _SndOpen("./midi.mid")
7+
handle = _SNDOPEN("./midi.mid")
98

10-
print handle;
9+
PRINT handle;
1110
SYSTEM
Binary file not shown.

tests/compile_tests/midi/custom-soundfont.bas

-14
This file was deleted.

tests/compile_tests/midi/custom-soundfont.output

-1
This file was deleted.

tests/compile_tests/midi/include/soundfont.bi

-4
This file was deleted.
-2.79 MB
Binary file not shown.

tests/compile_tests/midi/midisoundfont_no_unstable.bas

-2
This file was deleted.

tests/compile_tests/midi/midisoundfont_no_unstable.err

-4
This file was deleted.

tests/compile_tests/midi/relative_to_include.bas

-11
This file was deleted.

tests/compile_tests/midi/relative_to_include.compile-from-base

Whitespace-only changes.

tests/compile_tests/midi/relative_to_source.bas

-12
This file was deleted.

tests/compile_tests/midi/relative_to_source.compile-from-base

Whitespace-only changes.

0 commit comments

Comments
 (0)