MCPcopy Create free account
hub / github.com/z7zmey/php-parser / setFreeFloating

Method setFreeFloating

php7/parser.go:112–127  ·  view source on GitHub ↗
(dst node.Node, p freefloating.Position, strings []freefloating.String)

Source from the content-addressed store, hash-verified

110}
111
112func (l *Parser) setFreeFloating(dst node.Node, p freefloating.Position, strings []freefloating.String) {
113 if l.Lexer.GetWithFreeFloating() == false {
114 return
115 }
116
117 if len(strings) == 0 {
118 return
119 }
120
121 dstCollection := dst.GetFreeFloating()
122 if *dstCollection == nil {
123 *dstCollection = make(freefloating.Collection)
124 }
125
126 (*dstCollection)[p] = strings
127}
128
129func (l *Parser) GetFreeFloatingToken(t *scanner.Token) []freefloating.String {
130 if l.Lexer.GetWithFreeFloating() == false {

Callers 4

MoveFreeFloatingMethod · 0.95
addDollarTokenMethod · 0.95
ParseMethod · 0.45

Implementers 2

Parserphp7/parser.go
Parserphp5/parser.go

Calls 2

GetWithFreeFloatingMethod · 0.65
GetFreeFloatingMethod · 0.65

Tested by

no test coverage detected