Skip to content

Commit

Permalink
Merge pull request #54 from picoe/curtis/clone-fixes
Browse files Browse the repository at this point in the history
Copy Name and AddMatch when cloning parsers
  • Loading branch information
cwensley authored May 24, 2021
2 parents db0db42 + 0a68b6a commit 26e9b2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Eto.Parse/Eto.Parse.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ You can use BNF, EBNF, or Gold parser grammars to define your parser, code them
Change for v1.6:
* Fixed CharSetTerminal.CaseSensitive as it was inverted
* Add support for CharRangeTerminal.CaseSensitive
* Clone copies Name and AddMatch properties
* Large character set ranges no longer cause out of memory issues

Changes for v1.5:
* Add .NET Standard 2.0 target
Expand Down
7 changes: 6 additions & 1 deletion Eto.Parse/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@ protected Parser()
/// <param name="args">Arguments for the copy</param>
protected Parser(Parser other, ParserCloneArgs args)
{
AddError = other.AddError;
Name = other.Name;
addMatch = other.addMatch;
addMatchSet = other.addMatchSet;
addError = other.addError;
addErrorSet = other.addErrorSet;

args.Add(other, this);
}

Expand Down

0 comments on commit 26e9b2d

Please sign in to comment.