public void AddMatcher(CilMatcher matcher) { var currentCondition = processedConditions.Peek(); currentCondition.AddMatcher(matcher); if (matcher.NextConditionType != null) { AddCondition(matcher.NextConditionType); } }
private static CilMatcher CreateImplicitLiteralMatcher(string literal) { var outcome = CilSymbolRef.Create(literal); // Generate implicit scan rule for the keyword var result = new CilMatcher { Context = CilContextRef.None, MainOutcome = outcome, AllOutcomes = { outcome }, Disambiguation = Disambiguation.Exclusive, Pattern = ScanPattern.CreateLiteral(literal), ActionBuilder = code => code .Emit(il => il.Ldnull()) .ReturnFromAction() }; return(result); }
internal void AddMatcher(CilMatcher matcher) { matchers.Add(matcher); }