Skip to content

Commit d1aca9c

Browse files
Hailongnikic
authored andcommitted
README doc: add php 8.0 null safe method call and property access.
1 parent a9f6348 commit d1aca9c

File tree

1 file changed

+84
-82
lines changed

1 file changed

+84
-82
lines changed

README.md

Lines changed: 84 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -363,90 +363,92 @@ AST node kinds
363363
This section lists the AST node kinds that are supported and the names of their child nodes.
364364

365365
```
366-
AST_ARRAY_ELEM: value, key
367-
AST_ARROW_FUNC: name, docComment, params, stmts, returnType, attributes
368-
AST_ASSIGN: var, expr
369-
AST_ASSIGN_OP: var, expr
370-
AST_ASSIGN_REF: var, expr
371-
AST_ATTRIBUTE: class, args // php 8.0+ attributes (version 80+)
372-
AST_BINARY_OP: left, right
373-
AST_BREAK: depth
374-
AST_CALL: expr, args
375-
AST_CAST: expr
376-
AST_CATCH: class, var, stmts
377-
AST_CLASS: name, docComment, extends, implements, stmts
378-
AST_CLASS_CONST: class, const
379-
AST_CLASS_CONST_GROUP class, attributes // version 80+
380-
AST_CLASS_NAME: class // version 70+
381-
AST_CLONE: expr
382-
AST_CLOSURE: name, docComment, params, uses, stmts, returnType, attributes
383-
AST_CLOSURE_VAR: name
384-
AST_CONDITIONAL: cond, true, false
385-
AST_CONST: name
386-
AST_CONST_ELEM: name, value, docComment
387-
AST_CONTINUE: depth
388-
AST_DECLARE: declares, stmts
389-
AST_DIM: expr, dim
390-
AST_DO_WHILE: stmts, cond
391-
AST_ECHO: expr
392-
AST_EMPTY: expr
393-
AST_EXIT: expr
394-
AST_FOR: init, cond, loop, stmts
395-
AST_FOREACH: expr, value, key, stmts
396-
AST_FUNC_DECL: name, docComment, params, stmts, returnType, attributes
397-
uses // prior to version 60
398-
AST_GLOBAL: var
399-
AST_GOTO: label
400-
AST_GROUP_USE: prefix, uses
401-
AST_HALT_COMPILER: offset
402-
AST_IF_ELEM: cond, stmts
403-
AST_INCLUDE_OR_EVAL: expr
404-
AST_INSTANCEOF: expr, class
405-
AST_ISSET: var
406-
AST_LABEL: name
366+
AST_ARRAY_ELEM: value, key
367+
AST_ARROW_FUNC: name, docComment, params, stmts, returnType, attributes
368+
AST_ASSIGN: var, expr
369+
AST_ASSIGN_OP: var, expr
370+
AST_ASSIGN_REF: var, expr
371+
AST_ATTRIBUTE: class, args // php 8.0+ attributes (version 80+)
372+
AST_BINARY_OP: left, right
373+
AST_BREAK: depth
374+
AST_CALL: expr, args
375+
AST_CAST: expr
376+
AST_CATCH: class, var, stmts
377+
AST_CLASS: name, docComment, extends, implements, stmts
378+
AST_CLASS_CONST: class, const
379+
AST_CLASS_CONST_GROUP class, attributes // version 80+
380+
AST_CLASS_NAME: class // version 70+
381+
AST_CLONE: expr
382+
AST_CLOSURE: name, docComment, params, uses, stmts, returnType, attributes
383+
AST_CLOSURE_VAR: name
384+
AST_CONDITIONAL: cond, true, false
385+
AST_CONST: name
386+
AST_CONST_ELEM: name, value, docComment
387+
AST_CONTINUE: depth
388+
AST_DECLARE: declares, stmts
389+
AST_DIM: expr, dim
390+
AST_DO_WHILE: stmts, cond
391+
AST_ECHO: expr
392+
AST_EMPTY: expr
393+
AST_EXIT: expr
394+
AST_FOR: init, cond, loop, stmts
395+
AST_FOREACH: expr, value, key, stmts
396+
AST_FUNC_DECL: name, docComment, params, stmts, returnType, attributes
397+
uses // prior to version 60
398+
AST_GLOBAL: var
399+
AST_GOTO: label
400+
AST_GROUP_USE: prefix, uses
401+
AST_HALT_COMPILER: offset
402+
AST_IF_ELEM: cond, stmts
403+
AST_INCLUDE_OR_EVAL: expr
404+
AST_INSTANCEOF: expr, class
405+
AST_ISSET: var
406+
AST_LABEL: name
407407
AST_MAGIC_CONST:
408-
AST_MATCH: cond, stmts // php 8.0+ match
409-
AST_MATCH_ARM: cond, expr // php 8.0+ match
410-
AST_METHOD: name, docComment, params, stmts, returnType, attributes
411-
uses // prior to version 60
412-
AST_METHOD_CALL: expr, method, args
413-
AST_METHOD_REFERENCE: class, method
414-
AST_NAME: name
415-
AST_NAMED_ARG: name, expr // php 8.0 named parameters
416-
AST_NAMESPACE: name, stmts
417-
AST_NEW: class, args
418-
AST_NULLABLE_TYPE: type // Used only since PHP 7.1
419-
AST_PARAM: type, name, default, attributes, docComment
420-
AST_POST_DEC: var
421-
AST_POST_INC: var
422-
AST_PRE_DEC: var
423-
AST_PRE_INC: var
424-
AST_PRINT: expr
425-
AST_PROP: expr, prop
426-
AST_PROP_ELEM: name, default, docComment
427-
AST_PROP_GROUP: type, props, attributes // version 70+
428-
AST_REF: var // only used in foreach ($a as &$v)
429-
AST_RETURN: expr
430-
AST_SHELL_EXEC: expr
431-
AST_STATIC: var, default
432-
AST_STATIC_CALL: class, method, args
433-
AST_STATIC_PROP: class, prop
434-
AST_SWITCH: cond, stmts
435-
AST_SWITCH_CASE: cond, stmts
436-
AST_THROW: expr
437-
AST_TRAIT_ALIAS: method, alias
438-
AST_TRAIT_PRECEDENCE: method, insteadof
439-
AST_TRY: try, catches, finally
408+
AST_MATCH: cond, stmts // php 8.0+ match
409+
AST_MATCH_ARM: cond, expr // php 8.0+ match
410+
AST_METHOD: name, docComment, params, stmts, returnType, attributes
411+
uses // prior to version 60
412+
AST_METHOD_CALL: expr, method, args
413+
AST_METHOD_REFERENCE: class, method
414+
AST_NAME: name
415+
AST_NAMED_ARG: name, expr // php 8.0 named parameters
416+
AST_NAMESPACE: name, stmts
417+
AST_NEW: class, args
418+
AST_NULLABLE_TYPE: type // Used only since PHP 7.1
419+
AST_NULLSAFE_METHOD_CALL: expr, method, args // php 8.0 null safe operator
420+
AST_NULLSAFE_PROP: expr, prop // php 8.0 null safe operator
421+
AST_PARAM: type, name, default, attributes, docComment
422+
AST_POST_DEC: var
423+
AST_POST_INC: var
424+
AST_PRE_DEC: var
425+
AST_PRE_INC: var
426+
AST_PRINT: expr
427+
AST_PROP: expr, prop
428+
AST_PROP_ELEM: name, default, docComment
429+
AST_PROP_GROUP: type, props, attributes // version 70+
430+
AST_REF: var // only used in foreach ($a as &$v)
431+
AST_RETURN: expr
432+
AST_SHELL_EXEC: expr
433+
AST_STATIC: var, default
434+
AST_STATIC_CALL: class, method, args
435+
AST_STATIC_PROP: class, prop
436+
AST_SWITCH: cond, stmts
437+
AST_SWITCH_CASE: cond, stmts
438+
AST_THROW: expr
439+
AST_TRAIT_ALIAS: method, alias
440+
AST_TRAIT_PRECEDENCE: method, insteadof
441+
AST_TRY: try, catches, finally
440442
AST_TYPE:
441-
AST_UNARY_OP: expr
442-
AST_UNPACK: expr
443-
AST_UNSET: var
444-
AST_USE_ELEM: name, alias
445-
AST_USE_TRAIT: traits, adaptations
446-
AST_VAR: name
447-
AST_WHILE: cond, stmts
448-
AST_YIELD: value, key
449-
AST_YIELD_FROM: expr
443+
AST_UNARY_OP: expr
444+
AST_UNPACK: expr
445+
AST_UNSET: var
446+
AST_USE_ELEM: name, alias
447+
AST_USE_TRAIT: traits, adaptations
448+
AST_VAR: name
449+
AST_WHILE: cond, stmts
450+
AST_YIELD: value, key
451+
AST_YIELD_FROM: expr
450452
451453
// List nodes (numerically indexed children):
452454
AST_ARG_LIST

0 commit comments

Comments
 (0)