22 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_JS_REPLACER_H_
23 #define NET_INSTAWEB_REWRITER_PUBLIC_JS_REPLACER_H_
31 #include "pagespeed/kernel/js/js_tokenizer.h"
33 namespace net_instaweb {
41 : js_tokenizer_patterns_(patterns) {}
57 StringRewriter* rewriter);
70 Pattern() : rewriter(NULL) {}
72 StringRewriter* rewriter)
73 : object(object), field(field), rewriter(rewriter) {}
77 StringRewriter* rewriter;
86 std::vector<Pattern> patterns_;
JsReplacer(const pagespeed::js::JsTokenizerPatterns *patterns)
Does not take ownership of patterns.
Definition: js_replacer.h:40
Definition: js_replacer.h:35
bool Transform(StringPiece in, GoogleString *out)
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
Definition: js_tokenizer.h:194
Definition: callback.h:44
void AddPattern(const GoogleString &object, const GoogleString &field, StringRewriter *rewriter)