X-Git-Url: http://git.phpeclipse.com 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 7b63621..e3d3672 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 @@ -152,7 +152,7 @@ public class Parser extends PHPParserSuperclass implements ITerminalSymbols { this.initializeScanner(); } /** - * Class Constructor. + * ClassDeclaration Constructor. * *@param s *@param sess Description of Parameter @@ -1418,7 +1418,7 @@ public class Parser extends PHPParserSuperclass implements ITerminalSymbols { private void parseDeclarations( PHPOutlineInfo outlineInfo, - PHPSegmentWithChildren current, + OutlineableWithChildren current, boolean goBack) { char[] ident; // PHPClassDeclaration current = (PHPClassDeclaration) stack.peek(); @@ -1437,7 +1437,8 @@ public class Parser extends PHPParserSuperclass implements ITerminalSymbols { if (token == TokenNameVariable && store.getBoolean(PHPeclipsePlugin.PHP_OUTLINE_VAR)) { ident = scanner.getCurrentIdentifierSource(); - String variableName = new String(ident); + //substring(1) added because PHPVarDeclaration doesn't need the $ anymore + String variableName = new String(ident).substring(1); outlineInfo.addVariable(variableName); getNextToken(); if (token != TokenNameSEMICOLON) { @@ -1975,7 +1976,7 @@ public class Parser extends PHPParserSuperclass implements ITerminalSymbols { if (token == TokenNameIdentifier) { getNextToken(); } else { - throwSyntaxError("Class name expected after keyword 'extends'."); + throwSyntaxError("ClassDeclaration name expected after keyword 'extends'."); } } } else { @@ -1983,7 +1984,7 @@ public class Parser extends PHPParserSuperclass implements ITerminalSymbols { throwSyntaxError( "Don't use keyword for class declaration [" + token + "]."); } - throwSyntaxError("Class name expected after keyword 'class'."); + throwSyntaxError("ClassDeclaration name expected after keyword 'class'."); } }