mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-05 05:22:58 -05:00
Scripts: format the reserved word list
This commit is contained in:
1 parent
6fdb1c0eec
commit
9a2b6499ca
1 file changed
+24
-2
@@ -4,8 +4,30 @@ use super::{Analyzer, COMPOUND, FeatureId, NEWER, OutsideId, Pending, Sig, T, ca
|
||||
|
||||
/// Words that start or continue a statement or an expression, never a variable's name.
|
||||
const RESERVED: [&str; 24] = [
|
||||
"var", "function", "if", "else", "for", "while", "do", "return", "new", "typeof", "delete", "in", "instanceof", "this", "with", "switch", "case",
|
||||
"try", "catch", "finally", "throw", "break", "continue", "void",
|
||||
"var",
|
||||
"function",
|
||||
"if",
|
||||
"else",
|
||||
"for",
|
||||
"while",
|
||||
"do",
|
||||
"return",
|
||||
"new",
|
||||
"typeof",
|
||||
"delete",
|
||||
"in",
|
||||
"instanceof",
|
||||
"this",
|
||||
"with",
|
||||
"switch",
|
||||
"case",
|
||||
"try",
|
||||
"catch",
|
||||
"finally",
|
||||
"throw",
|
||||
"break",
|
||||
"continue",
|
||||
"void",
|
||||
];
|
||||
|
||||
/// A global name of the platform the report looks for (`$`, `File`, `Socket`, `alert`, `eval`…).
|
||||
|
||||
Reference in new issue
Block a user