You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tokenize_c.go 412B

123456789101112131415
  1. // +build flex
  2. package tokenizer
  3. import "github.com/src-d/enry/v2/internal/tokenizer/flex"
  4. // Tokenize returns lexical tokens from content. The tokens returned match what
  5. // the Linguist library returns. At most the first ByteLimit bytes of content are tokenized.
  6. func Tokenize(content []byte) []string {
  7. if len(content) > ByteLimit {
  8. content = content[:ByteLimit]
  9. }
  10. return flex.TokenizeFlex(content)
  11. }