Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Attributes | List of all members
pagespeed::js::JsTokenizerPatterns Struct Reference

#include "js_tokenizer.h"

Public Attributes

const RE2 identifier_pattern
const RE2 line_comment_pattern
const RE2 numeric_literal_pattern
const RE2 operator_pattern
const RE2 regex_literal_pattern
const RE2 string_literal_pattern
const RE2 whitespace_pattern
const RE2 line_continuation_pattern

Detailed Description

Structure to store RE2 patterns that can be shared by instances of JsTokenizer. These patterns are slightly expensive to compile, so we'd rather not create one for every JsTokenizer instance, but unfortunately C++ static initializers can run in non-deterministic order and cause other integration issues. Instead, you must create a JsTokenizerPatterns object yourself and pass it to the JsTokenizer constructor; ideally, you would just create one and share it for all JsTokenizer instances.

The documentation for this struct was generated from the following file: