# Pattern Matching with Queries

Code analysis often requires finding specific patterns in source code. Tree-sitter provides a simple pattern-matching
language for this purpose, similar to what's used in its [unit test system][unit testing].
This allows you to express and search for code structures without writing complex parsing logic.

[unit testing]: ../../creating-parsers/5-writing-tests.md
