Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/x sharp compiler #1631

Merged
merged 7 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions docs/Help/Topics/VersionHistory.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../helpproject.xsl" ?>
<topic template="Default" modified="2024-11-08T15:14:43.305+01:00" lasteditedby="robert" version="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
<topic template="Default" modified="2024-11-15T13:52:28.150+02:00" lasteditedby="cpc" version="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
<title>Version History</title>
<keywords>
<keyword>Changes</keyword>
Expand Down Expand Up @@ -180,7 +180,6 @@
<para styleclass="Heading3">Bug fixes</para>
<list id="2" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal" style="font-family:Symbol; font-size:11pt; color:#000000;">
<li styleclass="Normal">Fixed problem with saving/reading the OldStyleAssignment compiler option project setting (#1495)</li>
<li styleclass="Normal">Improved the Clone Window selection dialog in the VOWED (#1508)</li>
<li styleclass="Normal">Fixed an issue in VS2022 where several features in the editor were no longer working due to a change in VS (#1545)</li>
<li styleclass="Normal">Fixed editor indentation problem with SCAN...END SCAN (#1549)</li>
<li styleclass="Normal">Fixed a problem with putting the .resx file for windows forms user controls in an incorrect location in the Solution Explorer (#1560)</li>
Expand All @@ -205,6 +204,14 @@
<li styleclass="Normal">We have made several changes to the X# intellisense database structure. When you open a solution with an existing database, the database will be deleted and all source files will be rescanned (only once).</li>
<li styleclass="Normal">The X# source code editor now has an extra combobox on the top, listing the projects where a file is included. When a file is included in more than one project, all these projects can be seen. Switching to a new project will change the &apos;evaluation context&apos;. Conditional compiles (#ifdef) will reflect the change in the editor.</li>
<li styleclass="Normal">We have added support for the commands Edit.NextMethod and Edit.PreviousMethod in the editor. There usually is no shortcut for these commands, but you can assign them with the &quot;Customize&quot; option on the Toolbar in Visual Studio. You could assign Ctrl-DownArrow and Ctl-UpArrow for example.</li>
<li styleclass="Normal">Improved the Clone Window selection dialog in the VOWED (#1508)</li>
<li styleclass="Normal">When selecting multiple controls in the VOWED, now that lastly selected control becomes the &quot;active&quot; one for the Properties window</li>
<li styleclass="Normal">When pasting a control in the VOWED, it now goes to the bottom of the control order list</li>
</list>
<list id="5" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal" style="font-family:Symbol; font-size:11pt; color:#000000;">
<li styleclass="Normal">Added option in the VOWED Control Order dialog to start adjusting the control order of controls after the currently selected one when using &quot;Use Mouse&quot;</li>
</list>
<list id="2" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal" style="font-family:Symbol; font-size:11pt; color:#000000;">
<li styleclass="Normal">Updated the Mono.Cecil library to 0.11.6</li>
<li styleclass="Normal">Project files are adjusted when properties that were &quot;implicit&quot; before are missing (see above)</li>
</list>
Expand All @@ -222,11 +229,17 @@
<li styleclass="Normal">Fixed problem with not properly saving the compiler options /initlocals, /modernsyntax, /allowoldstyleassignments and /namedargs.</li>
<li styleclass="Normal">The Clipboard item in the main XIDE window statusbar now shows the current clipboard contents in a tooltip.</li>
<li styleclass="Normal">The Clipboard selection context menu now also displays the contents of every virtual clipboard.</li>
<li styleclass="Normal">Some small corrections to the Plugin System (you may need to recompile your plugins).</li>
<li styleclass="Normal">Added Open Bin Folder context menu option for the project node in the Project tool window.</li>
<li styleclass="Normal">Added option to the windows resource editor to include strings and text files.</li>
<li styleclass="Normal">Added application templates for FoxPro, XBase++, and Harbour dialects.</li>
<li styleclass="Normal">Application templates shown in the New Application dialog are now sorted by the GalleryIndex setting of each gallery file template.</li>
<li styleclass="Normal">Implemented new menu options View|Load/Save/Reset Layout, for switching between different layouts for the IDE window and tool windows</li>
<li styleclass="Normal">Added some new templates (code snippets) in template.cfg</li>
<li styleclass="Normal">Added project support for the /vo15 compiler option</li>
<li styleclass="Normal">Added standalone files default setting for the allowdot compiler option (Preferences/Compiler)</li>
<li styleclass="Normal">Added option to set the console location when running console apps (Preferences/Advanced)</li>
<li styleclass="Normal">Included several &quot;hidden&quot; commands in the main menu (File/Navigate and Edit/Advanced)</li>
<li styleclass="Normal">Improved deletion of items in the Watch tool window</li>
<li styleclass="Normal">Improved the About XIDE dialog.</li>
</list>
<para styleclass="Heading3">Editor</para>
Expand All @@ -244,7 +257,10 @@
<li styleclass="Normal">The editor now recognizes &amp;&amp; for line comments marker in FoxPro dialect.</li>
<li styleclass="Normal">Added intellisense support for Nullable types specified with the ? postfix (for example, INT?).</li>
<li styleclass="Normal">Added intellisense support for the ?: operator.</li>
<li styleclass="Normal">Added intellisense support for IF &lt;identifier&gt; IS &lt;type&gt; VAR &lt;local&gt;.</li>
<li styleclass="Normal">Added intellisense support for IF &lt;identifier&gt; IS &lt;type&gt; VAR &lt;local&gt;</li>
<li styleclass="Normal">Added option (Preferences/Editor/Edit) to automatically adjust numeric literals containing underscores</li>
<li styleclass="Normal">Added context menu Surround with options for REPEAT..UNTIL and BEGIN SCOPE...END</li>
<li styleclass="Normal">Added (experimental) option to sort entities in the editor (Edit-&gt;Sort Entities)</li>
</list>
<para styleclass="Normal"></para>
<para styleclass="Heading3">Designers</para>
Expand All @@ -258,6 +274,8 @@
<li styleclass="Normal">Added toolbar button to Lock/Unlock controls in the Windows.Forms and VO Window editors.</li>
<li styleclass="Normal">Locked state of controls is now preserved in the Windows.Forms designer (needs a Save Form to apply).</li>
<li styleclass="Normal">Fixed problem with setting the Text property of strip items to empty.</li>
<li styleclass="Normal">Added option in the VOWED Control Order dialog to start adjusting the control order of controls after the currently selected one when using &quot;Use Mouse&quot;.</li>
<li styleclass="Normal">Added components SaveFileDialog, OpenFileDialog and FolderBrowserDialog in the Windows.Forms toolbox</li>
</list>
<para styleclass="Normal"></para>
<para styleclass="Heading3">Debugger</para>
Expand All @@ -266,6 +284,14 @@
<li styleclass="Normal">Fixed a problem with incorrectly breaking on excluded handled exceptions.</li>
<li styleclass="Normal">Fixed a common crash that could happen in the debugger.</li>
</list>
<para styleclass="Normal"></para>
<para styleclass="Heading3">Plugin System</para>
<list id="5" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal" style="font-family:Symbol; font-size:11pt; color:#000000;">
<li styleclass="Normal">Some small corrections to the Plugin System (you may need to recompile your plugins)</li>
<li styleclass="Normal">Added Plugin:OnAfterCompileApplication(oApp AS Application, eResult AS CompileResult) callback method</li>
<li styleclass="Normal">Added Editor:SetSelection() method to select text in the editor</li>
<li styleclass="Normal">Entity objects returned from the plugin system no longer include END CLASS and END NAMESPACE statements</li>
</list>
<para styleclass="Heading2">Documentation</para>
<para styleclass="Heading3">Bug fixes</para>
<list id="6" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal" style="font-family:Symbol; font-size:11pt; color:#000000;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9216,31 +9216,27 @@ protected ExpressionSyntax CreateInterPolatedStringExpression(IToken token, XSha
}
string format = null;
string expr = e;
int pos = expr.IndexOf(':');
if (!allowDot)
bool singleColon = false;
// Format character?
int pos = expr.IndexOf("::");
if (pos < 0 && allowDot)
{
pos = expr.IndexOf("::");
pos = expr.IndexOf(':');
singleColon = pos > 0;
}
if (pos > 0)
{

var lhs = expr.Substring(0, pos).ToUpper();
if (lhs == "SELF" || lhs == "SUPER" || lhs == "THIS")
if (singleColon)
{
; // do nothing. Assume SELF:, SUPER: and THIS: are not shown with format specifier
format = expr.Substring(pos);
}
else
{
if (allowDot)
{
format = expr.Substring(pos);
}
else
{
format = expr.Substring(pos + 1);
}
expr = expr.Substring(0, pos);
format = expr.Substring(pos + 1);
}
expr = expr.Substring(0, pos);
}
res = ParseSubExpression(expr, out var extra, token);
if (!string.IsNullOrEmpty(format))
Expand Down
4 changes: 3 additions & 1 deletion src/CompilerTests/Applications/R915/Prg/R915.prg
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,7 @@ CLASS Test
CONSTRUCTOR(nNum as DWORD)
SELF:Text := Repl(Chr(64+nNum),10)
SELF:Number := nNum
REPLACE FLD1 with ::Text
// Removed next line. Would try to read at EOF in the
// test code, and will also overwrite changes to the previous record
//REPLACE FLD1 with ::Text
END CLASS
2 changes: 1 addition & 1 deletion src/CompilerTests/Automated/CompilerTests.prg
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ RETURN oApp

METHOD LoadApplication(oApp AS AppClass,oStream AS StreamReader) AS STRING
STATIC LOCAL aRuntime := <STRING>{;
"XSharp.Core","XSharp.VO","XSharp.RT","XSharp.RDD","XSharp.VFP","XSharp.XPP","XSharp.MacroCompiler","XSharp.Data",;
"XSharp.Core","XSharp.VO","XSharp.RT","XSharp.RDD","XSharp.VFP","XSharp.XPP","XSharp.MacroCompiler","XSharp.Data", "XSharp.Harbour",;
"VulcanRTFuncs","VulcanRT",;
"VulcanVOConsoleClasses","VulcanVOGUIClasses","VulcanVOInternetClasses","VulcanVORDDClasses","VulcanVOSQLClasses","VulcanVOSystemClasses","VulcanVOWin32APILibrary",;
"VOConsoleClasses","VOGUIClasses","VOInternetClasses","VORDDClasses","VOSQLClasses","VOSystemClasses","VOWin32APILibrary";
Expand Down
Binary file modified src/CompilerTests/Runtime/VOConsoleClasses.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/VOGUIClasses.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/VOInternetClasses.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/VORDDClasses.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/VOSQLClasses.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/VOSystemClasses.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/VOWin32APILibrary.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/XSharp.Core.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/XSharp.Data.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/XSharp.MacroCompiler.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/XSharp.RT.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/XSharp.Rdd.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/XSharp.VFP.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/XSharp.VO.dll
Binary file not shown.
Binary file modified src/CompilerTests/Runtime/XSharp.XPP.dll
Binary file not shown.
19 changes: 9 additions & 10 deletions src/CompilerTests/xSharp Tests.viproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ ApplicationGroup = C150-C199,EBE227D6-3F55-4251-A268-C654F38F1FAF,715D7617-320E-
ApplicationGroup = C800-C849,54E26745-C95C-4FDB-98B2-2AF8DB1DED34,715D7617-320E-41FF-B82F-E314D950CD23
ApplicationGroup = R800-R849,084FC9A2-9274-4770-AE44-6D078B06BA37,715D7617-320E-41FF-B82F-E314D950CD23
ApplicationGroup = C850-C899,B3CDE601-F52E-476A-9FD5-35CEE1E8C029,715D7617-320E-41FF-B82F-E314D950CD23
ApplicationGroup = R850-R899,4913BA1E-7338-4E92-9D0A-7C3EABF0B562,715D7617-320E-41FF-B82F-E314D950CD23
ApplicationGroup = R900-R949,1BBEE766-1BC4-4BAE-9C98-BAEB270E8A0F,715D7617-320E-41FF-B82F-E314D950CD23
ApplicationGroup = R850-R899,4913BA1E-7338-4E92-9D0A-7C3EABF0B562,1BBEE766-1BC4-4BAE-9C98-BAEB270E8A0F
ApplicationGroup = C900-C949,3AF1ABF5-A5F7-479A-BB57-D226C13AA002,715D7617-320E-41FF-B82F-E314D950CD23
ApplicationGroup = NEW,B9CFE839-D401-428D-94E9-E9D21E9F772D,723E53EA-0D2C-4FC9-B86E-F050D29A49D2
ApplicationGroup = Known Incompatibilities with VO,40E29AF9-85EE-4D50-BADC-953EE318D423,723E53EA-0D2C-4FC9-B86E-F050D29A49D2
Expand Down Expand Up @@ -121377,7 +121377,7 @@ Target = 0
Platform = x86
Language = XSharp
Runtime = CLR4
Dialect = VO
Dialect = Core
Folder = %ProjectPath%\Applications\Tester\
PrgSubFolder = \Prg
ResourcesSubFolder = \Resources
Expand Down Expand Up @@ -121414,7 +121414,6 @@ CopyToBin = 0
[Tester References]
ReferenceGAC = CLR4,System,1,0,4.0.0.0
ReferenceGAC = CLR4,System.Core,1,0,4.0.0.0
ReferenceBrowse = E:\XSharp\Dev\src\CompilerTests\Runtime\XSharp.RT.dll,1,1
[Tester Resources]
[Tester Native Resources]
[Tester License files]
Expand All @@ -121437,7 +121436,7 @@ VO11=0
VO12=0
VO13=0
VO14=0
VO15=1
VO15=0
VO16=0
VO17=0
FOX1=0
Expand All @@ -121457,7 +121456,7 @@ ModernSyntax=0
NamedArgs=0
InitLocals=0
AllowOldStyleAssignments=0
AllowDotOption=1
AllowDotOption=0
ResponseOnly=0
[Tester Configurations]
AppConfig = Debug,11111111-1111-1111-1111-111111111111
Expand Down Expand Up @@ -132529,9 +132528,9 @@ CopyToBin = 0
[C910 - Compiler problem reading clipper/harbour .prg file with end of file marker References]
ReferenceGAC = CLR4,System,1,0,4.0.0.0
ReferenceGAC = CLR4,System.Core,1,0,4.0.0.0
ReferenceGAC = XSharp.Core,1,0,2.6.0.0
ReferenceGAC = XSharp.Harbour,1,0,2.6.0.0
ReferenceGAC = XSharp.RT,1,0,2.6.0.0
ReferenceBrowse = %ProjectPath%\Runtime\XSharp.Core.dll,1,1
ReferenceBrowse = %ProjectPath%\Runtime\XSharp.RT.dll,1,1
ReferenceBrowse = %ProjectPath%\Runtime\XSharp.Harbour.dll,1,1
[C910 - Compiler problem reading clipper/harbour .prg file with end of file marker Resources]
[C910 - Compiler problem reading clipper/harbour .prg file with end of file marker Native Resources]
[C910 - Compiler problem reading clipper/harbour .prg file with end of file marker License files]
Expand Down Expand Up @@ -133699,7 +133698,7 @@ AppConfig = Release,22222222-2222-2222-2222-222222222222
Optimize=0
ENDApplication = C913 - More VFP UDC tests

ApplicationGroup = B9CFE839-D401-428D-94E9-E9D21E9F772D
ApplicationGroup = 1BBEE766-1BC4-4BAE-9C98-BAEB270E8A0F
; ************** APPLICATION R925 - Namespace - Property resolution *************
Application = R925 - Namespace - Property resolution
IDEVersion = 1.06
Expand Down Expand Up @@ -133940,7 +133939,7 @@ AppConfig = Release,22222222-2222-2222-2222-222222222222
Optimize=0
ENDApplication = R926 - TextMerge and function parameters

ApplicationGroup = B9CFE839-D401-428D-94E9-E9D21E9F772D
ApplicationGroup = A95A4D23-3574-40FD-B873-22D28ACCA212
; ************** APPLICATION R927 - VFP Error line number *************
Application = R927 - VFP Error line number
IDEVersion = 1.06
Expand Down
3 changes: 3 additions & 0 deletions src/Runtime/XSharp.Rdd/FlexFile/FlexRDD.xh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ BEGIN NAMESPACE XSharp.RDD
IF SELF:_ReadOnly
SELF:_dbfError(ERDD.READONLY, XSharp.Gencode.EG_READONLY )
ENDIF
IF SELF:EoF
RETURN TRUE
ENDIF
SELF:ForceRel()
IF SELF:_readRecord()
// GoHot() must be called first because this saves the current index values
Expand Down