MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / itokens

Method itokens

src/licensedcode/match.py:735–744  ·  view source on GitHub ↗

Return the sequence of matched itoken ids.

(self, idx)

Source from the content-addressed store, hash-verified

733 return False
734
735 def itokens(self, idx):
736 """
737 Return the sequence of matched itoken ids.
738 """
739 ispan = self.ispan
740 rid = self.rule.rid
741 if rid is not None:
742 for pos, token in enumerate(idx.tids_by_rid[rid]):
743 if pos in ispan:
744 yield token
745
746 def itokens_hash(self, idx):
747 """

Calls

no outgoing calls