cedricrupb / code_ast

Fast and robust AST parsing of any language
MIT License
26 stars 6 forks source link

Update the code_ast to code_cst? #2

Open shihai1991 opened 1 year ago

shihai1991 commented 1 year ago

tree-sitter' goal is that It can build a concrete syntax tree for a source file. If code_ast's backend is tree-sitter, so the tree is cst, not ast?

cedricrupb commented 1 year ago

Thank you for pointing this out!

You are right code.ast currently uses the tree-sitter's parse tree as is. Therefore, the library currently produces a CST instead of an AST.

I will consider renaming the library. Until then, I updated the README to highlight that code.ast currently produces a CST.

shihai1991 commented 1 year ago

Thank you for pointing this out!

You are right code.ast currently uses the tree-sitter's parse tree as is. Therefore, the library currently produces a CST instead of an AST.

I will consider renaming the library. Until then, I updated the README to highlight that code.ast currently produces a CST.

Get it. Thanks for your reply :)