withSymbol method

GeneratedTreeSitterNode withSymbol(
  1. int value,
  2. TreeSitterSymbolMetadata metadata
)

Implementation

GeneratedTreeSitterNode withSymbol(
  int value,
  TreeSitterSymbolMetadata metadata,
) => GeneratedTreeSitterNode(
  symbol: value,
  structuralSymbol: structuralSymbol,
  type: metadata.name,
  startByte: startByte,
  endByte: endByte,
  startPoint: startPoint,
  endPoint: endPoint,
  named: metadata.named,
  visible: metadata.visible,
  extra: extra,
  productionId: productionId,
  dynamicPrecedence: dynamicPrecedence,
  missing: missing,
  missingNameIsNamed: missingNameIsNamed,
  recoveryRepeat: _recoveryRepeat,
  unexpectedCharacter: unexpectedCharacter,
  children: children,
  fields: fields,
  productionFields: productionFields,
  parseState: parseState,
  // Native `ts_subtree_set_symbol` changes the leaf's symbol in place. For
  // a non-leaf, the first leaf remains a descendant and is unaffected.
  firstLeafSymbol: children.isEmpty ? value : firstLeafSymbol,
  firstLeafParseState: firstLeafParseState,
  paddingBytes: paddingBytes,
  paddingExtent: paddingExtent,
  sizeBytes: sizeBytes,
  sizeExtent: sizeExtent,
  lookaheadBytes: lookaheadBytes,
  hasChanges: hasChanges,
  fragileLeft: fragileLeft,
  fragileRight: fragileRight,
  dependsOnColumn: dependsOnColumn,
  isKeyword: isKeyword,
  hasExternalTokens: hasExternalTokens,
  externalScannerStateBefore: externalScannerStateBefore,
  externalScannerStateAfter: externalScannerStateAfter,
);