Crate ast_grep_core

Source
Expand description

This module contains the core library for ast-grep.

It provides APIs for parsing, traversing, searching and replacing tree-sitter nodes. Usually you will only need ast-grep CLI instead of this crate. But if you want to use ast-grep as a library, this is the right place.

Re-exports§

Modules§

Structs§

  • ’r represents root lifetime
  • Represents a position in the source code. The line and column are zero-based, character offsets. It is different from tree-sitter’s position which is zero-based byte offsets. Note, accessing column is O(n) operation.

Enums§