Skip to content

Better compiler error message for missing END marker #1735

@cpyrgas

Description

@cpyrgas

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()

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions