(kind ast.Kind, data uint32, childIndices []int)
| 240 | } |
| 241 | |
| 242 | func (d *astDecoder) createNode(kind ast.Kind, data uint32, childIndices []int) (*ast.Node, error) { |
| 243 | dataType := data & NodeDataTypeMask |
| 244 | commonData := uint8((data >> 24) & 0x3f) |
| 245 | |
| 246 | switch dataType { |
| 247 | case NodeDataTypeString: |
| 248 | return d.createStringNode(kind, data, commonData) |
| 249 | case NodeDataTypeExtendedData: |
| 250 | return d.createExtendedNode(kind, data, childIndices, commonData) |
| 251 | default: |
| 252 | return d.createChildrenNode(kind, data, childIndices, commonData) |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | func (d *astDecoder) decodeExtendedData_SourceFile(data uint32, childIndices []int, commonData uint8) (*ast.Node, error) { |
| 257 | extOff := int(d.extData) + int(data&NodeDataStringIndexMask) |
no test coverage detected