From c096d93c420f58e9be299ab07fba3aac128ab79a Mon Sep 17 00:00:00 2001 From: Irwin Rodriguez Date: Tue, 30 Jun 2026 18:25:13 +0200 Subject: [PATCH 1/2] Absorb CLEAR and RELEASE commands --- src/Common/FoxProCmd.xh | 25 ++++++++++++-- src/Runtime/XSharp.VFP.Tests/CommandTests.prg | 33 +++++++++++++++++++ 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/src/Common/FoxProCmd.xh b/src/Common/FoxProCmd.xh index 3252d78b9f..bcf5cf1f3b 100644 --- a/src/Common/FoxProCmd.xh +++ b/src/Common/FoxProCmd.xh @@ -158,7 +158,7 @@ #command DIR <*any*> => __VfpDir( <"any"> ) #command DIRECTORY <*any*> => __VfpDir( <"any"> ) - +#command CLEAR => __VfpUnsupported("CLEAR") #command DIR => __VfpDir( "" ) #command DIRECTORY => __VfpDir( "" ) @@ -675,7 +675,7 @@ #command LABEL <*any*> => __VfpUnsupported("LABEL") #command CREATE <*any*> ; - => #error This command is not supported: <(udc)> + => __VfpUnsupported("CREATE " + <(cmd)>) // supported CREATE commands in FoxProSql.xh // CREATE CURSOR @@ -684,7 +684,7 @@ // CREATE [SQL] VIEW #command MODIFY <*any*> ; - => #error This command is not supported: <(udc)> + => __VfpUnsupported("MODIFY " + <(cmd)>) #ifndef NOASSERT #command ASSERT [MESSAGE ] ; @@ -695,6 +695,25 @@ #translate VARTYPE(,<1>) => __VfpVarType( {|| }, <1> ) #include "FoxProSql.xh" + +#command CLEAR <*any*> => __VfpUnsupported("CLEAR") + +#xtranslate RELEASE BAR => __VfpUnsupported("RELEASE BAR") +#xtranslate RELEASE BAR <*any*> => __VfpUnsupported("RELEASE BAR") +#xtranslate RELEASE CLASSLIB => __VfpUnsupported("RELEASE CLASSLIB") +#xtranslate RELEASE CLASSLIB <*any*> => __VfpUnsupported("RELEASE CLASSLIB") +#xtranslate RELEASE LIBRARY => __VfpUnsupported("RELEASE LIBRARY") +#xtranslate RELEASE LIBRARY <*any*> => __VfpUnsupported("RELEASE LIBRARY") +#xtranslate RELEASE MENUS => __VfpUnsupported("RELEASE MENUS") +#xtranslate RELEASE MODULE => __VfpUnsupported("RELEASE MODULE") +#xtranslate RELEASE MODULE <*any*> => __VfpUnsupported("RELEASE MODULE") +#xtranslate RELEASE PAD => __VfpUnsupported("RELEASE PAD") +#xtranslate RELEASE PAD <*any*> => __VfpUnsupported("RELEASE PAD") +#xtranslate RELEASE POPUPS => __VfpUnsupported("RELEASE POPUPS") +#xtranslate RELEASE PROCEDURE => __VfpUnsupported("RELEASE PROCEDURE") +#xtranslate RELEASE PROCEDURE <*any*> => __VfpUnsupported("RELEASE PROCEDURE") +#xtranslate RELEASE WINDOWS => __VfpUnsupported("RELEASE WINDOWS") + #endif // EOF diff --git a/src/Runtime/XSharp.VFP.Tests/CommandTests.prg b/src/Runtime/XSharp.VFP.Tests/CommandTests.prg index 2126254339..b23d63265d 100644 --- a/src/Runtime/XSharp.VFP.Tests/CommandTests.prg +++ b/src/Runtime/XSharp.VFP.Tests/CommandTests.prg @@ -360,6 +360,39 @@ BEGIN NAMESPACE XSharp.VFP.Tests // If we get here without exception, the command is properly absorbed Assert.True(.T.) END METHOD + + [Fact, Trait("Category", "Commands")]; + METHOD ClearVariantsCompile AS VOID + CLEAR + CLEAR CLASS xyz + CLEAR CLASSLIB + CLEAR DLLS + CLEAR FIELDS + CLEAR GETS + CLEAR MACROS + CLEAR MENUS + CLEAR POPUPS + CLEAR PROGRAM + CLEAR PROMPT + CLEAR READ + CLEAR TYPEAHEAD + CLEAR WINDOWS + Assert.True(TRUE) + END METHOD + + [Fact, Trait("Category", "Commands")]; + METHOD ReleaseVariantsCompile AS VOID + RELEASE BAR xyz + RELEASE CLASSLIB xyz + RELEASE LIBRARY xyz + RELEASE MENUS + RELEASE MODULE xyz + RELEASE PAD xyz + RELEASE POPUPS + RELEASE PROCEDURE xyz + RELEASE WINDOWS + Assert.True(TRUE) + END METHOD END CLASS END NAMESPACE From daa533e788f0df933abaf39c36a95a2508a9555c Mon Sep 17 00:00:00 2001 From: Irwin Rodriguez Date: Tue, 30 Jun 2026 18:35:39 +0200 Subject: [PATCH 2/2] Consolidated RELEASE rules with match markers --- src/Common/FoxProCmd.xh | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/Common/FoxProCmd.xh b/src/Common/FoxProCmd.xh index bcf5cf1f3b..f29df36d5e 100644 --- a/src/Common/FoxProCmd.xh +++ b/src/Common/FoxProCmd.xh @@ -698,21 +698,8 @@ #command CLEAR <*any*> => __VfpUnsupported("CLEAR") -#xtranslate RELEASE BAR => __VfpUnsupported("RELEASE BAR") -#xtranslate RELEASE BAR <*any*> => __VfpUnsupported("RELEASE BAR") -#xtranslate RELEASE CLASSLIB => __VfpUnsupported("RELEASE CLASSLIB") -#xtranslate RELEASE CLASSLIB <*any*> => __VfpUnsupported("RELEASE CLASSLIB") -#xtranslate RELEASE LIBRARY => __VfpUnsupported("RELEASE LIBRARY") -#xtranslate RELEASE LIBRARY <*any*> => __VfpUnsupported("RELEASE LIBRARY") -#xtranslate RELEASE MENUS => __VfpUnsupported("RELEASE MENUS") -#xtranslate RELEASE MODULE => __VfpUnsupported("RELEASE MODULE") -#xtranslate RELEASE MODULE <*any*> => __VfpUnsupported("RELEASE MODULE") -#xtranslate RELEASE PAD => __VfpUnsupported("RELEASE PAD") -#xtranslate RELEASE PAD <*any*> => __VfpUnsupported("RELEASE PAD") -#xtranslate RELEASE POPUPS => __VfpUnsupported("RELEASE POPUPS") -#xtranslate RELEASE PROCEDURE => __VfpUnsupported("RELEASE PROCEDURE") -#xtranslate RELEASE PROCEDURE <*any*> => __VfpUnsupported("RELEASE PROCEDURE") -#xtranslate RELEASE WINDOWS => __VfpUnsupported("RELEASE WINDOWS") +#xtranslate RELEASE => __VfpUnsupported("RELEASE " + <(cmd)>) +#xtranslate RELEASE <*any*> => __VfpUnsupported("RELEASE " + <(cmd)>) #endif