From ae64a6009f818c1e078a5a629ad767f608e4b102 Mon Sep 17 00:00:00 2001 From: toshihiro Date: Thu, 26 Apr 2007 09:55:02 +0000 Subject: [PATCH] Fix #1523506 - Parser error for one-liner end* control structure --- .../phpdt/internal/compiler/parser/Parser.java | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java index 47d1390..5fddf9e 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java @@ -2013,7 +2013,7 @@ public class Parser implements ITerminalSymbols, CompilerModifiers, throwSyntaxError("'endif' expected."); } getNextToken(); - if (token != TokenNameSEMICOLON) { + if (token != TokenNameSEMICOLON && token != TokenNameINLINE_HTML) { reportSyntaxError("';' expected after if-statement."); iState.sourceEnd = scanner.getCurrentTokenStartPosition(); } else { @@ -2255,7 +2255,7 @@ public class Parser implements ITerminalSymbols, CompilerModifiers, throwSyntaxError("'endswitch' expected."); } getNextToken(); - if (token != TokenNameSEMICOLON) { + if (token != TokenNameSEMICOLON && token != TokenNameINLINE_HTML) { throwSyntaxError("';' expected after switch-statement."); } getNextToken(); @@ -2283,7 +2283,7 @@ public class Parser implements ITerminalSymbols, CompilerModifiers, throwSyntaxError("'endfor' expected."); } getNextToken(); - if (token != TokenNameSEMICOLON) { + if (token != TokenNameSEMICOLON && token != TokenNameINLINE_HTML) { throwSyntaxError("';' expected after for-statement."); } getNextToken(); @@ -2301,7 +2301,7 @@ public class Parser implements ITerminalSymbols, CompilerModifiers, throwSyntaxError("'endwhile' expected."); } getNextToken(); - if (token != TokenNameSEMICOLON) { + if (token != TokenNameSEMICOLON && token != TokenNameINLINE_HTML) { throwSyntaxError("';' expected after while-statement."); } getNextToken(); @@ -2318,7 +2318,7 @@ public class Parser implements ITerminalSymbols, CompilerModifiers, throwSyntaxError("'endforeach' expected."); } getNextToken(); - if (token != TokenNameSEMICOLON) { + if (token != TokenNameSEMICOLON && token != TokenNameINLINE_HTML) { throwSyntaxError("';' expected after foreach-statement."); } getNextToken(); -- 1.7.1