15 #ifndef PAGESPEED_KERNEL_JS_JS_MINIFY_H_
16 #define PAGESPEED_KERNEL_JS_JS_MINIFY_H_
23 #include "pagespeed/kernel/js/js_tokenizer.h"
33 enum JsWhitespace { kNoWhitespace, kSpace, kLinebreak };
53 net_instaweb::source_map::MappingVector* mappings);
66 StringPiece* token_out,
74 JsWhitespace whitespace_;
76 StringPiece prev_token_;
78 StringPiece next_token_;
79 net_instaweb::source_map::MappingVector* mappings_;
96 bool MinifyUtf8Js(
const JsTokenizerPatterns* patterns,
103 bool MinifyUtf8JsWithSourceMap(
104 const JsTokenizerPatterns* patterns,
106 net_instaweb::source_map::MappingVector* mappings);
118 bool MinifyJs(
const StringPiece& input,
GoogleString* out);
121 bool GetMinifiedJsSize(
const StringPiece& input,
int* minimized_size);
128 bool MinifyJsAndCollapseStrings(
const StringPiece& input,
GoogleString* output);
129 bool GetMinifiedStringCollapsedJsSize(
const StringPiece& input,
130 int* minimized_size);
bool has_error() const
Definition: js_minify.h:62
bool has_error() const
Definition: js_tokenizer.h:79
Definition: source_map.h:37
Type
Definition: js_keywords.h:33
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
JsKeywords::Type NextToken(StringPiece *token_out)
Gets the next token type from the input,.
Definition: js_tokenizer.h:194
Definition: js_tokenizer.h:62
JsMinifyingTokenizer(const JsTokenizerPatterns *patterns, StringPiece input)
Definition: js_minify.h:41