public static enum Context.JsFollowingSlash extends Enum<Context.JsFollowingSlash>
/) means when parsing JavaScript source code.
A slash that is not followed by another slash or an asterisk (*) can either start a
regular expression literal or start a division operator.
This determination is made based on the full grammar, but Waldemar defined a very close to
accurate grammar for a JavaScript 1.9 draft based purely on a regular lexical grammar which is
what we use in the autoescaper.JsUtil.isRegexPreceder(java.lang.String)| Enum Constant and Description |
|---|
DIV_OP
A slash as the next token would start a division operator.
|
NONE
Not in JavaScript.
|
REGEX
A slash as the next token would start a regular expression literal.
|
UNKNOWN
We do not know what a slash as the next token would start so it is an error for the next
token to be a slash.
|
| Modifier and Type | Method and Description |
|---|---|
static Context.JsFollowingSlash |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Context.JsFollowingSlash[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Context.JsFollowingSlash NONE
public static final Context.JsFollowingSlash REGEX
public static final Context.JsFollowingSlash DIV_OP
public static final Context.JsFollowingSlash UNKNOWN
public static Context.JsFollowingSlash[] values()
for (Context.JsFollowingSlash c : Context.JsFollowingSlash.values()) System.out.println(c);
public static Context.JsFollowingSlash valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null