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

Method setFreeFloating

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

Source from the content-addressed store, hash-verified

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