All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.jdt.internal.compiler.parser.ConflictedParser Maven / Gradle / Ivy

There is a newer version: 3.39.0
Show newest version
/*******************************************************************************
 * Copyright (c) 2000, 2019 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.compiler.parser;

public interface ConflictedParser {

	/* Return true if at the configuration the parser finds itself in, token would need to be disambiguated.
	   At Java SE 8 time, we have three tokens that need to clarified: the use of '( and that of '<' and finally
	   whether an @ begins a SE8 style type annotation or a SE5 declaration annotation. Where they can co-exist,
	   we treat the type annotation as a declarative annotation.
	*/
	boolean atConflictScenario(int token);
	/*
	 * Return true if the parser is parsing a module declaration. In Java 9, module, requires, exports,
	 * to, uses, provides, and with are restricted keywords (i.e. they are keywords solely where they
	 * appear as terminals in ModuleDeclaration, and are identifiers everywhere else)
	 */
	boolean isParsingModuleDeclaration();
	boolean isParsingJava14();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy