Tokenizer v0.0a

by XTREME104

JavaScript

const CHARS = "";

const AS_KEYWORDS = [
    // Reserved Words : Words that you cannot use as identifiers in your code because the words are reserved for use by ActionScript. Reserved words include lexical keywords, which are removed from the program namespace by the compiler. The compiler will report an error if you use a lexical keyword as an identifier.
    "as",
    "break",
    "case",
    "catch",
    "class",
    "const",
    "continue",
    "default",
    "delete",
    "do",
    "else",
    "extends",
    "false",
    "finally",
    "for",
    "function",
    "if",
    "implements",
    "import",
    "in",
    "instanceof",
    "interface",
    "internal",
    "is",
    "native",
    "new",
    "null",
    "package",
    "private",
    "protected",
    "public",
    "return",
    "super",
    "switch",
    "this",
    "throw",
    "to",
    "true",
    "try",
    "typeof",
    "use",
    "var",
    "void",
    "while",
    "with",
    
    // Syntactic Keywords: Can be used as identifiers, but have special meaning in certain contexts.
    "each",
    "get",
    "set",
    "namespace",
    "include",
    "dynamic",
    "final",
    "native",
    "override",
    "static",
    
    // Future Reserved Words: Not reserved by ActionScript 3.0, though some of them may be treated as keywords by software that incorporates ActionScript 3.0. You might be able to use many of these identifiers in your code, but Adobe recommends that you do not use them because they may appear as keywords in a subsequent version of the language.
    /*"abstract",
    "boolean",
    "byte",
    "cast",
    "char",
    "debugger",
    "double",
    "enum",
    "export",
    "float",
    "goto",
    "intrinsic",
    "long",
    "prototype",
    "short",
    "synchronized",
    "throws",
    "to",
    "transient",
    "type",
    "virtual",
    "volatile",*/
];

const JS_KEYWORDS = [
    "break",
    "case",
    "catch",
    "class",
    "continue",
    "debugger",
    "default",
   ...