Beispiel #1
0
        protected AbsInvoker(ParserOption options, string sourceCode)
        {
            Options = options;
            SourceCode = sourceCode;
            OutputParser = new ScopeParser(options, new ScopeTag {BeginTag = "<$@", CloseTag = "@$>"});
            OutputParameterParser = new ScopeParser(options,
                                                    new ScopeTag
                                                        {BeginTag = "@(", CloseTag = ")", BeginDropInNextSpace = true});

            if (Cached == null)
                Cached = new Dictionary<Guid, CompilerResults>();
        }
Beispiel #2
0
 public string Parse(ParserType type)
 {
     var tmp = string.Empty;
     switch (type)
     {
         case ParserType.XCODER:
             var scope = new ScopeParser(Options);
             scope.OnParse += (scope_OnParse);
             var output = scope.Parse();
             var param = new ParamParser(Options);
             output = param.Parse(new StringBuilder(output));
             tmp = output;
             scope.Release();
             param.Release();
             break;
         default:
             throw new ArgumentOutOfRangeException("type");
     }
     Options.Code = null;
     return tmp;
 }