예제 #1
0
 public Preprocessor(IIncludeHandler?inc = null, IMacroHandler?mac = null, EmbeddedCodeFactory?emb = null)
     : base(new Loc())
 {
     Stack    = new SrcStack();
     Includes = inc ?? new Includes();
     Macros   = mac ?? new MacroDB();
 }
예제 #2
0
 public TemplateReplacer(Src src, string pattern, SubstituteFunction subst, int chunk_size = 4096)
 {
     Src            = new SrcStack(src);
     Substitute     = subst;
     Pattern        = new Regex(pattern);
     ChunkSize      = chunk_size;
     OutputLocation = new Loc();
     m_match_ofs    = 0;
 }