1272N/A/*
1272N/A * CDDL HEADER START
1272N/A *
1272N/A * The contents of this file are subject to the terms of the
1272N/A * Common Development and Distribution License (the "License").
1272N/A * You may not use this file except in compliance with the License.
1272N/A *
1272N/A * See LICENSE.txt included in this distribution for the specific
1272N/A * language governing permissions and limitations under the License.
1272N/A *
1272N/A * When distributing Covered Code, include this CDDL HEADER in each
1272N/A * file and include the License file at LICENSE.txt.
1272N/A * If applicable, add the following below this CDDL HEADER, with the
1272N/A * fields enclosed by brackets "[]" replaced with your own identifying
1272N/A * information: Portions Copyright [yyyy] [name of copyright owner]
1272N/A *
1272N/A * CDDL HEADER END
1272N/A */
1272N/A
1272N/A/*
1272N/A * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
1272N/A */
1272N/A
1272N/Apackage org.opensolaris.opengrok.analysis.javascript;
1272N/A
1272N/Aimport java.util.HashSet;
1272N/Aimport java.util.Set;
1272N/A
1272N/A/**
1272N/A * Holds static hash set containing the Javascript keywords
1272N/A *
1272N/A * * ECMA-262 5.1 Edition June 2011
1272N/A *
1272N/A */
1272N/Apublic class Consts{
1272N/A public static final Set<String> kwd = new HashSet<String>() ;
1272N/A static {
1272N/A //constants
1272N/A kwd.add("true");
1272N/A kwd.add("false");
1272N/A kwd.add("null");
1272N/A //builtins
1272N/A kwd.add("Array");
1272N/A kwd.add("Boolean");
1272N/A kwd.add("Date");
1272N/A kwd.add("Function");
1272N/A kwd.add("Math");
1272N/A kwd.add("Number");
1272N/A kwd.add("Object");
1272N/A kwd.add("RegExp");
1272N/A kwd.add("String");
1272N/A //keywords
1272N/A kwd.add( "break" );
1272N/A kwd.add( "case" );
1272N/A kwd.add( "catch" );
1272N/A kwd.add( "continue" );
1272N/A kwd.add( "debugger" );
1272N/A kwd.add( "default" );
1272N/A kwd.add( "delete" );
1272N/A kwd.add( "do" );
1272N/A kwd.add( "else" );
1272N/A kwd.add( "finally" );
1272N/A kwd.add( "for" );
1272N/A kwd.add( "function" );
1272N/A kwd.add( "if" );
1272N/A kwd.add( "in" );
1272N/A kwd.add( "instanceof" );
1272N/A kwd.add( "new" );
1272N/A kwd.add( "return" );
1272N/A kwd.add( "switch" );
1272N/A kwd.add("this");
1272N/A kwd.add( "throw" );
1272N/A kwd.add( "try" );
1272N/A kwd.add( "typeof" );
1272N/A kwd.add( "var" );
1272N/A kwd.add( "void" );
1272N/A kwd.add( "while" );
1272N/A kwd.add( "with" );
1272N/A //future reserved
1272N/A kwd.add( "class" );
1272N/A kwd.add( "const" );
1272N/A kwd.add( "enum" );
1272N/A kwd.add( "export" );
1272N/A kwd.add( "extends" );
1272N/A kwd.add( "import" );
1272N/A kwd.add( "super" );
1272N/A //strict future reserved
1272N/A kwd.add( "implements" );
1272N/A kwd.add( "interface" );
1272N/A kwd.add( "let" );
1272N/A kwd.add( "package" );
1272N/A kwd.add( "private" );
1272N/A kwd.add( "protected" );
1272N/A kwd.add( "public" );
1272N/A kwd.add( "static" );
1272N/A kwd.add( "yield" );
1272N/A
1272N/A }
1272N/A}