node: prototype of regularising the parse emission context

This commit is contained in:
mappu 2020-04-15 19:08:18 +12:00
parent 979049ae42
commit e95a5a1162
1 changed files with 10 additions and 0 deletions

10
node.go
View File

@ -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