getNextToken();
}
return statement;
+ } else if(token == TokenNameconst){
+ getNextToken();
+ if(token == TokenNameIdentifier){
+ getNextToken();
+ if(token == TokenNameEQUAL){
+ getNextToken();
+ }
+ //throwSyntaxError("'Ed i know your here");
+ }
} else if (token == TokenNamestatic) {
getNextToken();
static_var_list();
case TokenNameinclude_once:
case TokenNamerequire:
case TokenNamerequire_once:
+ case TokenNameNamespace:
+ case TokenNameconst:
internal_functions_in_yacc();
break;
// | '(' expr ')'
// T_REQUIRE_ONCE expr
checkFileName(token);
break;
+ case TokenNameNamespace:
+ // NAMESPACE expr
+ checkNameSpaceName();
+ break;
+ case TokenNameconst:
+ getNextToken();
+ expr();
+ break;
}
}
-
+
+ /**
+ * parse and check the namespace name
+ * @since 1.2.3
+ * @param namespaceToken
+ */
+ private void checkNameSpaceName(){
+ getNextToken();
+ while (true) {
+ if (token == TokenNameSEMICOLON) {
+ break;
+ }
+ getNextToken();
+ }
+
+ }
/**
* Parse and check the include file name
*
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,