Пример #1
0
  public static void init() {
    listeners = new ArrayList<CompilerListener>();

    commentProperties = new HashMap<Integer, CommentProperties>();
    methodProperties = new HashMap<Integer, MethodProperties>();
    identifierProperties = new HashMap<Integer, IdentifierProperties>();

    Keyword.addLanguage(JAVA);
    Keyword.addLanguage(GLSL);
    Keyword.addLanguage(ASSEMBLY);
    Keyword.addLanguage(FOXY);
    Keyword.addLanguage(CPP);
    Keyword.addLanguage(C);
    Keyword.addLanguage(PHP);
    Keyword.addLanguage(PYTHON);

    JavaLanguage.init();
    GLSLLanguage.init();
    AssemblyLanguage.init();
    FoxyLanguage.init();
    CppLanguage.init();
    CLanguage.init();
    PHPLanguage.init();
    PythonLanguage.init();

    commentProperties.put(JAVA, JavaLanguage.COMMENT_PROPERTIES);
    commentProperties.put(GLSL, GLSLLanguage.COMMENT_PROPERTIES);
    commentProperties.put(ASSEMBLY, AssemblyLanguage.COMMENT_PROPERTIES);
    commentProperties.put(FOXY, FoxyLanguage.COMMENT_PROPERTIES);
    commentProperties.put(CPP, CppLanguage.COMMENT_PROPERTIES);
    commentProperties.put(C, CppLanguage.COMMENT_PROPERTIES);
    commentProperties.put(PHP, PHPLanguage.COMMENT_PROPERTIES);
    commentProperties.put(PYTHON, PythonLanguage.COMMENT_PROPERTIES);

    methodProperties.put(JAVA, JavaLanguage.METHOD_PROPERTIES);
    methodProperties.put(GLSL, GLSLLanguage.METHOD_PROPERTIES);
    methodProperties.put(ASSEMBLY, AssemblyLanguage.METHOD_PROPERTIES);
    methodProperties.put(FOXY, FoxyLanguage.METHOD_PROPERTIES);
    methodProperties.put(CPP, CppLanguage.METHOD_PROPERTIES);
    methodProperties.put(C, CppLanguage.METHOD_PROPERTIES);
    methodProperties.put(PHP, PHPLanguage.METHOD_PROPERTIES);
    methodProperties.put(PYTHON, PythonLanguage.METHOD_PROPERTIES);

    identifierProperties.put(JAVA, JavaLanguage.IDENTIFIER_PROPERTIES);
    identifierProperties.put(GLSL, GLSLLanguage.IDENTIFIER_PROPERTIES);
    identifierProperties.put(ASSEMBLY, AssemblyLanguage.IDENTIFIER_PROPERTIES);
    identifierProperties.put(FOXY, FoxyLanguage.IDENTIFIER_PROPERTIES);
    identifierProperties.put(CPP, CppLanguage.IDENTIFIER_PROPERTIES);
    identifierProperties.put(C, CppLanguage.IDENTIFIER_PROPERTIES);
    identifierProperties.put(PHP, PHPLanguage.IDENTIFIER_PROPERTIES);
    identifierProperties.put(PYTHON, PythonLanguage.IDENTIFIER_PROPERTIES);
  }