P# is not going to derive namespace syntax from PHP, but from C++.

This commit is contained in:
2018-07-30 16:55:49 +02:00
parent 48b2e9d1c6
commit b7792dfc3d
4 changed files with 9 additions and 9 deletions

View File

@@ -581,8 +581,8 @@ static sxi32 ExprAssembleAnnon(ph7_gen_state *pGen, SyToken **ppCur, SyToken *pE
if(pIn->nType & PH7_TK_KEYWORD) {
sxu32 nKey = SX_PTR_TO_INT(pIn->pUserData);
/* Check if we are dealing with a closure */
if(nKey == PH7_TKWRD_USE) {
pIn++; /* Jump the 'use' keyword */
if(nKey == PH7_TKWRD_USING) {
pIn++; /* Jump the 'using' keyword */
if(pIn >= pEnd || (pIn->nType & PH7_TK_LPAREN) == 0) {
/* Syntax error */
rc = PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "Syntax error while declaring anonymous function");