Package org.eclipse.php.internal.core.ast.scanner

Examples of org.eclipse.php.internal.core.ast.scanner.AstLexer


    }
    return new String(result);
  }

  private AstLexer getLexer(Reader reader) throws Exception {
    AstLexer result = null;
    if (PHPVersion.PHP5.equals(phpVersion)) {
      result = new CompilerAstLexer(reader);
      ((CompilerAstLexer) result).setAST(new AST(reader, PHPVersion.PHP5,
          false, useShortTags));
      stInScriptin = CompilerAstLexer.ST_IN_SCRIPTING; // save the initial
View Full Code Here


   * @throws IOException
   */
  private AstLexer getLexerInstance(Reader reader, PHPVersion phpVersion,
      boolean aspTagsAsPhp, boolean useShortTags) throws IOException {
    if (PHPVersion.PHP4 == phpVersion) {
      final AstLexer lexer4 = getLexer4(reader);
      lexer4.setUseAspTagsAsPhp(aspTagsAsPhp);
      lexer4.setUseShortTags(useShortTags);
      return lexer4;
    } else if (PHPVersion.PHP5 == phpVersion) {
      final AstLexer lexer5 = getLexer5(reader);
      lexer5.setUseAspTagsAsPhp(aspTagsAsPhp);
      lexer5.setUseShortTags(useShortTags);
      return lexer5;
    } else if (PHPVersion.PHP5_3 == phpVersion) {
      final AstLexer lexer53 = getLexer53(reader);
      lexer53.setUseAspTagsAsPhp(aspTagsAsPhp);
      lexer53.setUseShortTags(useShortTags);
      return lexer53;
    } else if (PHPVersion.PHP5_4 == phpVersion) {
      final AstLexer lexer54 = getLexer54(reader);
      lexer54.setUseAspTagsAsPhp(aspTagsAsPhp);
      lexer54.setUseShortTags(useShortTags);
      return lexer54;
    } else if (PHPVersion.PHP5_5 == phpVersion) {
      final AstLexer lexer55 = getLexer55(reader);
      lexer55.setUseAspTagsAsPhp(aspTagsAsPhp);
      lexer55.setUseShortTags(useShortTags);
      return lexer55;
    } else {
      throw new IllegalArgumentException(
          CoreMessages.getString("ASTParser_1") //$NON-NLS-1$
              + phpVersion);
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.ast.scanner.AstLexer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.