Beispiel #1
0
 private void scope_OnParse(AbsParser parser, ParserEventArgs e)
 {
     var sc = e.Body.ToString();
     var option = e.Option.Clone() as ParserOption;
     var invoker = new ScopeInvoker(option, sc);
     invoker.Execute(e.Option.StatementParameters);
     e.Replace = true;
     e.Replacement = new StringBuilder(invoker.Result);
 }
Beispiel #2
0
 private void ParamParser_OnParse(AbsParser parser, ParserEventArgs e)
 {
     var value = @params[e.Body.ToString().Trim(' ')];
     e.Replace = true;
     e.Replacement = new StringBuilder(value);
 }
Beispiel #3
0
 private void OutputParser_OnParse(AbsParser parser, ParserEventArgs e)
 {
     var tmp = e.Body;
     OutputParameterParser.OnParse += (OutputParameterParser_OnParse);
     var body = OutputParameterParser.Parse(tmp);
     OutputParameterParser.OnParse -= (OutputParameterParser_OnParse);
     e.Replace = true;
     e.Replacement = new StringBuilder(string.Format("Output += @\"{0}\";", body));
 }
Beispiel #4
0
 private void OutputParameterParser_OnParse(AbsParser parser, ParserEventArgs e)
 {
     var tmp = e.Body;
     e.Replace = true;
     e.Replacement = new StringBuilder(string.Format("\"+{0}+@\"", tmp));
 }