petitparser / dart-petitparser

Dynamic parser combinators in Dart.
https://pub.dartlang.org/packages/petitparser
MIT License
457 stars 48 forks source link

flatten() issue with map() #117

Closed gmpassos closed 3 years ago

gmpassos commented 3 years ago

Can we have a warning or exception when calling build(), and know that flatten() was called in a node that calls map() in his sub-tree?

I don't think that we need to change the actual flatten() behavior, but any map() call is overwritten by flatten() and this should be notified.

Maybe a strict mode?:

.build(strict: true)

renggli commented 3 years ago

Related to #105.