Example #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();
 }
 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;
 }