Closed cverbiest closed 3 years ago
The SQL statements were dropped during the transition to ANTRL4, so your original error is expected. But the shortened version should raise an error at line 4, while it gobbles every token after SELECT. Will be investigated.
Is there something I can put in the source to mark the unparsable code so that the parser skips it ?
define variable lList as character no-undo.
define variable lCountr as integer no-undo.
...
@LegacySyntax("begin").
select count(*) into lCountr from _user.
@LegacySyntax("end").
...
Just thinking, not really requesting unless it's already possible or if it's very low-hanging fruit.
Will be easier to implement with proparse directive. I've quickly added support for {&_proparse_ skip-section}
and {&_proparse_ end-skip-section}
, will be available in 2.10. Any token found between those two directives are skipped (not even considered as comments or invisible tokens).
Or would there be a better name for that ?
Proposed naming works for me, but I'd prefer {&proparse skip-section-start } and {&proparse skip-section-end }. That way a search for "&proparse skip-section" would show both start & end, and you can search for skip-section-start & skip-section-end as well
Right!
I created following sample when trying to reproduce a parse error on the select statement. I do not get the parse error but I get false positives on llist & lCountr.
If I remove the select statement the false positives are gone as well.
The original error I was trying to reproduce is
and line 75 is