Input:
class MyClass
{
function myFunction()
{
// Nothing
}
}
function always interpreted as public. Maybe we can add hiddenVisibility: true (maybe best name)?
I'm agree with you, initially the AST was made to act as the PHP engine acts, so the public visibility is implicit.
Yes, I could disable https://github.com/glayzzle/php-parser/blob/master/src/parser/class.js#L248 so when not public keyword is used, the visibility flag could be -1.
I could release it as a breaking change, v3
@ichiriac will be great :+1:
@evilebottnawi, now the visibility property is empty when the keyword is not defined.
@ichiriac thanks!
@ichiriac it is work for const public const OTHER_CONST = 'value'; ?
@evilebottnawi yes, the visibilty should be node.visibility = "public" in this case
@ichiriac can you release patch with this changes?
I will work on php-parser bug this week, and I'll release it under 3.0.0-alpha
@ichiriac Awesome :+1:
Most helpful comment
I will work on php-parser bug this week, and I'll release it under 3.0.0-alpha