ident.append(ch);
if (ch == '$') {
+ getChar();
+ // attention recursive call:
+ getIdentifier();
token = TT_VARIABLE;
+ return;
} else {
token = TT_IDENTIFIER;
}
+
getChar();
while ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || (ch == '_')) {
ident.append(ch);
identifier = ident.toString();
chIndx--;
+ // determine if this identitfer is a keyword
+ // @todo improve this in future version
Integer i = (Integer) keywordMap.get(identifier.toLowerCase());
if (i != null) {
token = i.intValue();
getNextToken();
} else if (token == TT_function) {
getNextToken();
+ if (token == TT_AMPERSAND) {
+ getNextToken();
+ }
if (token == TT_IDENTIFIER) {
outlineInfo.addVariable(identifier);
current.add(new PHPFunctionDeclaration(current, identifier, chIndx - identifier.length()));