diff --git a/website/advanced/custom-language.md b/website/advanced/custom-language.md index e69de29b..33b3926f 100644 --- a/website/advanced/custom-language.md +++ b/website/advanced/custom-language.md @@ -0,0 +1,3 @@ +# Custom Language Support + +This is experimental! See https://github.com/ast-grep/ast-grep.github.io/issues/98 diff --git a/website/advanced/match-algorithm.md b/website/advanced/match-algorithm.md index e69de29b..11579f7f 100644 --- a/website/advanced/match-algorithm.md +++ b/website/advanced/match-algorithm.md @@ -0,0 +1,29 @@ +# Deep Dive in Pattern + +## What is TreeSitter + +## Core Concepts +A list of ast-grep's concepts + +### Textual vs Structural +TODO +### AST vs CST +TODO +### Named nodes vs Unnamed nodes +TODO +### Kind vs Field +TODO +### Significant vs Trivial +TODO + +## Match Algorithm + +In descending order of strict-ness + +* CST: all nodes are matched +* Smart: all nodes except source trivial nodes are matched. +* Significant: only significant nodes are matched +* AST: only ast nodes are matched +* Lenient: ast-nodes excluding comments are matched + +Currently ast-grep only supports cst.