Icon statement truncated while compiling, on hyphen

This forum is meant for questions and discussions about the X# language and tools
User avatar
robert
Posts: 4470
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Icon statement truncated while compiling, on hyphen

Post by robert »

Dick,
ic2 wrote: Error:

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.InvalidCastException: Unable to cast object of type 'LanguageService.CodeAnalysis.XSharp.Syntax.InternalSyntax.BlockSyntax' to type 'LanguageService.CodeAnalysis.XSharp.Syntax.InternalSyntax.IfStatementSyntax'.
at LanguageService.CodeAnalysis.XSharp.SyntaxParser.RuleExtensions.Get[T](IXParseTree t)
Did you get this with Beta 9 ?

I think this is a known issue where you have a case statement with only an otherwise clause.
And that problem was solved in Beta 9.

The latest download from Beta 9 should also catch this error and display an error XS9999 (Internal error) so this will be at least also logged to the error list.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4826
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Icon statement truncated while compiling, on hyphen

Post by Chris »

Guys,

Just to clear things up, VOXporter already does make such adjustments to the .rc files, it substitutes DEFINEs and macros and does surround filenames with double quotes and doubles the backslashes when needed. It's just that I was not aware of the hyphens thing, will make that trigger VOXPorter surround filenames without double quotes, too.

Also also XIDE uses the same solution for .rc file compiling, by using one (temp) global .rc file with #include statements to all .rc files to be included in the app. Apparently both myself and Robert investigated possible solutions for this separately, and ended up using the exact same solution in both VS and XIDE, which sounds good!

But I do see a difference in behavior between the two, which is causing the next problem Dick is facing. Dick, sorry, didn't get the time to look into it yet, but will do now and will get back to you when I find what's causing it exactly.

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1855
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Icon statement truncated while compiling, on hyphen

Post by ic2 »

Replying on #11,#12:

Hello Robert, Chris,

I always delay almost any update but in this case Bandol 9 solved it so I should have updated directly. I now get decent error messages which I will for now repair in my VO program (for later XPorting) and X# (for documenting what compiler errors may come up and how to solve these).

Two more remarks:

1 What an amazing number of issues and enhancement you all address in 1 month. I counted 54 changes. I think that's more than Microsoft addresses in 1 Windows 10 feature release. Or more accurate, they do not tend to fix anything in such a release but just add a lot of new features nobody asked for and nobody uses (like Timeline, People Bar etc). Contrary to the way you work!

2 Also amazing is how many actual errors are detected which aren't in VO. Some are not really an error (I have added some comments after an ENDIF without // which works in VO but not in X#) but there are some potentially serious ones which X# found and VO doesn't.

Yes, I still love VO, the entity editing, the CLASS behind the method. It's a lot more organized. But I do see that X# seems to be a lot better compiler.

Dick
User avatar
robert
Posts: 4470
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Icon statement truncated while compiling, on hyphen

Post by robert »

Dick,

Thanks for the nice words.
The comments after ENDIF are not supported in the Vulcan dialect, but they should be supported (or more accurately ignored) in the VO dialect, as well as comments after NEXT, ENDDO and similar keywords.
And separate METHOD entities with the CLASS <CLassname> clause behind the method is still supported. You have to make the class definition partial and end the class defintion with END CLASS but you should be able to declare methods outside of the class .. end class if you add the CLASS <classname> clause. We do not recommend it but it should work

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply