tagua-vm / parser

Safe, fast and memory efficient PHP parser (lexical and syntactic analysers, and the Abstract Syntax Tree)
http://tagua.io/
119 stars 15 forks source link

Expression: Add the `anonymous_function` rule #88

Closed Hywan closed 7 years ago

Hywan commented 7 years ago

Address #68. Fix #91.

Specification

https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#anonymous-function-creation

Hywan commented 7 years ago

Function parameter, and arity are supported correctly. Need to support default value for parameter, and we will be able to finish anonymous function too.

Hywan commented 7 years ago

To do:

https://github.com/php/php-langspec/blob/master/spec/13-functions.md#general

Each parameter name in a function-definition must be distinct.