---
title: Source Code
description: Tokenizes text that is actually code
canonical: https://docs.paradedb.com/documentation/tokenizers/available-tokenizers/source-code
---

The source code tokenizer is intended for tokenizing code. In addition to splitting on whitespace,
punctuation, and symbols, it also splits on common casing conventions like camel case and snake case. For instance, text like
`my_variable` or `myVariable` would get split into `my` and `variable`.

```sql
CREATE INDEX search_idx ON mock_items
USING paradedb (id, (description::pdb.source_code))
WITH (key_field='id');
```

To get a feel for this tokenizer, run the following command and replace the text with your own:

```sql
SELECT 'let my_variable = 2;'::pdb.source_code::text[];
```

```ini Expected Response
        text
---------------------
 {let,my,variable,2}
(1 row)
```
