Class StringOps::ConcatenationElement
An element of a string concatenation, which either itself performs a string concatenation or occurs as an operand in a string concatenation.
For example, the expression x + y + z contains the following concatenation
elements:
- The leaf elements
x,y, andz - The intermediate element
x + y, which is both a concatenation and an operand - The root element
x + y + z
Import path
import semmle.go.StringOpsDirect supertypes
Known direct subtypes
Predicates
| asNode | Gets the data-flow node corresponding to this concatenation element, if any. |
| getALeaf | Gets a leaf in the concatenation tree that this element is the root of. |
| getAnOperand | Gets an operand of this string concatenation. |
| getConcatenationRoot | Gets the root of the concatenation tree to which this element belongs. |
| getFirstLeaf | Gets the first leaf in this concatenation tree. |
| getFirstOperand | Gets the first operand of this string concatenation. |
| getLastLeaf | Gets the last leaf in this concatenation tree. |
| getLastOperand | Gets the last operand of this string concatenation. |
| getLocation | Gets the location of this element. |
| getNumOperand | Gets the number of operands of this string concatenation. |
| getOperand | Gets the |
| getStringValue | Gets the string value of this concatenation element if it is a constant. |
| hasLocationInfo | DEPRECATED: Use |
| toString | Gets a textual representation of this concatenation element. |