throwSyntaxError("'endif' expected.");
}
getNextToken();
- if (token != TokenNameSEMICOLON) {
+ if (token != TokenNameSEMICOLON && token != TokenNameINLINE_HTML) {
reportSyntaxError("';' expected after if-statement.");
iState.sourceEnd = scanner.getCurrentTokenStartPosition();
} else {
throwSyntaxError("'endswitch' expected.");
}
getNextToken();
- if (token != TokenNameSEMICOLON) {
+ if (token != TokenNameSEMICOLON && token != TokenNameINLINE_HTML) {
throwSyntaxError("';' expected after switch-statement.");
}
getNextToken();
throwSyntaxError("'endfor' expected.");
}
getNextToken();
- if (token != TokenNameSEMICOLON) {
+ if (token != TokenNameSEMICOLON && token != TokenNameINLINE_HTML) {
throwSyntaxError("';' expected after for-statement.");
}
getNextToken();
throwSyntaxError("'endwhile' expected.");
}
getNextToken();
- if (token != TokenNameSEMICOLON) {
+ if (token != TokenNameSEMICOLON && token != TokenNameINLINE_HTML) {
throwSyntaxError("';' expected after while-statement.");
}
getNextToken();
throwSyntaxError("'endforeach' expected.");
}
getNextToken();
- if (token != TokenNameSEMICOLON) {
+ if (token != TokenNameSEMICOLON && token != TokenNameINLINE_HTML) {
throwSyntaxError("';' expected after foreach-statement.");
}
getNextToken();
if (token == TokenNameIdentifier) {
ref = new SingleTypeReference(scanner.getCurrentIdentifierSource(),
scanner.getCurrentTokenStartPosition());
+ int pos = scanner.currentPosition;
getNextToken();
+ if (token == TokenNamePAAMAYIM_NEKUDOTAYIM) {
+ // Not terminated by T_STRING, reduce to dynamic_class_name_reference
+ scanner.currentPosition = pos;
+ token = TokenNameIdentifier;
+ ref = null;
+ dynamic_class_name_reference();
+ }
} else {
ref = null;
dynamic_class_name_reference();
if (path == null) {
// SyntaxError: "File: << >> doesn't exist in project."
String[] args = { expression.toStringExpression(),
- project.getLocation().toString() };
+ project.getFullPath().toString() };
problemReporter.phpIncludeNotExistWarning(args,
literal.sourceStart, literal.sourceEnd,
referenceContext,
// create a package name similar to java package names
String projectPath = ProjectPrefUtil.getDocumentRoot(file.getProject())
.toString();
- String filePath = file.getRawLocation().toString();
- String ext = file.getRawLocation().getFileExtension();
- int fileExtensionLength = ext == null ? 0 : ext.length() + 1;
- ImportReference impt;
- char[][] tokens;
+ String filePath = file.getFullPath().toString();
+
+ String ext = file.getFileExtension();
+ int fileExtensionLength = ext == null ? 0 : ext.length() + 1;
+ ImportReference impt;
+ char[][] tokens;
if (filePath.startsWith(projectPath)) {
tokens = CharOperation.splitOn('/', filePath.toCharArray(),
projectPath.length() + 1, filePath.length()