XSharpPublic icon indicating copy to clipboard operation
XSharpPublic copied to clipboard

Better compiler error message for missing END marker

Open cpyrgas opened this issue 6 months ago • 0 comments

https://www.xsharp.eu/forum/topic/5571?p=34110#p34110

When there's a missing END, the compiler throws a parser error mentioning only the next entity. If there are many nested block statements in the previous entity, it can be very tricky for the user to spot the missing END. Maybe it's possible to trap this in one way for all such cases and report a better error message?

error XS9002: Parser: unexpected input 'FUNCTION'

FUNCTION aaa()
	IF TRUE
	DO WHILE TRUE
	FOR n := 1 TO 10
	DO CASE
		
FUNCTION bbb()

cpyrgas avatar Jun 13 '25 16:06 cpyrgas