예제 #1
0
 private void Parse(string input)
 {
     var context = new ScannerSyntax();
     Language.Parse(context, input);
     Assert.IsNotNull(context.Result.Node);
 }
예제 #2
0
        private AstNode GetAst(string pattern)
        {
            var context = new ScannerSyntax();
            using (var interp = new Interpreter<ScannerSyntax>(context))
            {
                interp.CustomLogging = this.logging;
                if (!interp.Parse(pattern))
                {
                    return AstNode.Stub;
                }

                AstNode root = context.Result.Node;
                return root;
            }
        }