nitlang / nit

Nit language
http://nitlanguage.org
Apache License 2.0
238 stars 64 forks source link

NitCC implements Separator and Tail #2836

Closed privat closed 2 weeks ago

privat commented 2 months ago

Also cleanup plus.

For reference, plus in the parser transform

foo = x bar+ y | z ;

into

foo = x abs0 y | z ;
abs0 = {one:} bar | {more:} abs0 bar ;

With Separator ansd Tail,

foo = x (bar Separator baz)+ y | z ;

becomes

foo = x abs1 y | z ;
abs0 = bar baz ;
abs1 = (one:) bar | {more:} abs0+ bar;

and

foo = x (bar Tail baz)+ y | z ;

becomes

foo = x abs1 y | z ;
abs0 = bar baz ;
abs1 = (one:) bar | {more:} abs0+ bar | {tail:} abs0+;
github-actions[bot] commented 2 months ago

Test Results

    67 files     314 suites   11m 28s :stopwatch: 14 174 tests 13 623 :white_check_mark: 541 :zzz: 0 :x: 10 :fire: 14 230 runs  13 664 :white_check_mark: 556 :zzz: 0 :x: 10 :fire:

For more details on these errors, see this check.

Results for commit e9675360.