On Monday, August 15, 2022 at 6:43:06 AM UTC-5 Edward K. Ream wrote:

> Vitalije's importer code has primed the psychological pump. The effect on 
> the importers will be a spectacular collapse in complexity.
>

Indeed yes. The work is complete. See PR #2741 
<https://github.com/leo-editor/leo-editor/pull/2741>, which has been merged 
into the main work (ekr-new-importers branch).

Today is an important milestone in the history of Leo's importers. The code 
probably can't much simpler.

The overall project, PR #2729 
<https://github.com/leo-editor/leo-editor/pull/2729>, is nearing 
completion. A few coverage and functional tests remain.

Edward

P.S. *i.scan_all_lines*, and its helper *i.scan_one_line*, replace *all* 
the horrendous scan tables and related horrible code.

i.scan_all_lines just calls i.scan_one_line for each input line.

i.scan_one_line recognizes strings and comments. As a "trap door" for 
overrides,  i.scan_one_line calls i.update_level to handle the details of 
updating logical level. the XML and HTML importers use i.update_level to 
handle tags. So i.scan_one_line is simple and general.

scan_one_line isn't equipped to handle PHP heredoc comments. If this ever 
becomes an issue we the PHP importer could just override i.scan_one_line.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/c3e84eb3-c69c-49d0-b413-8e0f77ccaaf9n%40googlegroups.com.

Reply via email to