Do not use PH7_KEYWORD_FUNCTION for closure declaration.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
0524092539
commit
8aacf7c70e
|
@ -700,7 +700,7 @@ static sxi32 ExprExtractNode(ph7_gen_state *pGen, ph7_expr_node **ppNode) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(nKeyword == PH7_KEYWORD_FUNCTION) {
|
} else if(pCur[1].nType & PH7_TK_LPAREN && (nKeyword & PH7_KEYWORD_TYPEDEF)) {
|
||||||
/* Anonymous function */
|
/* Anonymous function */
|
||||||
if(&pCur[1] >= pGen->pEnd) {
|
if(&pCur[1] >= pGen->pEnd) {
|
||||||
/* Assume a literal */
|
/* Assume a literal */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class Program {
|
class Program {
|
||||||
|
|
||||||
function main(string[] $args) {
|
function main(string[] $args) {
|
||||||
callback $y = function() {
|
callback $y = void() {
|
||||||
callback $a = 'printf';
|
callback $a = 'printf';
|
||||||
$a("I'm alive\n");
|
$a("I'm alive\n");
|
||||||
var_dump($a);
|
var_dump($a);
|
||||||
|
|
Loading…
Reference in New Issue