node: prototype of regularising the parse emission context
This commit is contained in:
parent
979049ae42
commit
e95a5a1162
10
node.go
10
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 {
|
type conversionState struct {
|
||||||
currentClassName string
|
currentClassName string
|
||||||
currentClassParentName string
|
currentClassParentName string
|
||||||
|
Loading…
Reference in New Issue
Block a user