diff --git a/node.go b/node.go index 638f974..a8c4c39 100644 --- a/node.go +++ b/node.go @@ -42,6 +42,16 @@ func (pe parseErr) Unwrap() error { // +type ParseContext int + +const ( + TopLevelContext ParseContext = iota // We are free to inject entire additional statements + RvalueFreeContext // We are free to make `x, ok := foo(); ok` transformations e.g. for array_key_exists()/isset() + RvalueRestrictedContext // We are not free to make semicolon transformations +) + +// + type conversionState struct { currentClassName string currentClassParentName string