Closed olivr70 closed 3 years ago
Just discovered that AddMatch property is not copied either in Parser copy constructor.
I connot see a reason why, and from a newcomer perspective I do not predict any negative impacts.
The main reason is having two parsers with the same name in the same grammar is a conflict. It could very well copy the name, however as you can just overwrite it with the WithName()
extension.
Thanks for the feedback! (and sorry for the late response)
Hello,
I just discovered Eto.Parse and I really enjoy it. Great piece of work.
I would like use it to build a library of reusable parsers which can be combined in multiple small grammars for scraping items in documents.
The problem is that when cloning a Parser, the names are lost and it does not properly fill the Matches property of the result
The following test fails
I just checked Parser copy constructor, and it does not set the name of the new instance to the one of the source.
Is there any reason for this, or can I make a Pull request ?