From 86f754bdd721c7694f7da559e0da0649d798d79c Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 27 Oct 2019 01:44:52 +0200 Subject: [PATCH] ZoneCodeGenerator: Fix GroupOptional not registering Tag when being matched --- .../Parsing/Matching/Matchers/MatcherGroupOptional.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ZoneCodeGenerator/Parsing/Matching/Matchers/MatcherGroupOptional.cs b/src/ZoneCodeGenerator/Parsing/Matching/Matchers/MatcherGroupOptional.cs index 6be2ac31..7792cd4d 100644 --- a/src/ZoneCodeGenerator/Parsing/Matching/Matchers/MatcherGroupOptional.cs +++ b/src/ZoneCodeGenerator/Parsing/Matching/Matchers/MatcherGroupOptional.cs @@ -12,6 +12,7 @@ protected override TokenMatchingResult PerformTest(MatchingContext context, int tokenOffset) { var result = matcher.Test(context, tokenOffset); + result.PrependTag(Tag); return !result.Successful ? new TokenMatchingResult(true, 0) : result; }