Package: astgrepr 0.0.9
astgrepr: Parse and Manipulate R Code
Parsing R code is key to build tools such as linters and stylers. This package provides a binding to the Rust crate 'ast-grep' so that one can parse and explore R code.
Authors:
astgrepr_0.0.9.tar.gz
astgrepr_0.0.9.zip(r-4.5)astgrepr_0.0.9.zip(r-4.4)astgrepr_0.0.9.zip(r-4.3)
astgrepr_0.0.9.tgz(r-4.4-x86_64)astgrepr_0.0.9.tgz(r-4.4-arm64)astgrepr_0.0.9.tgz(r-4.3-arm64)
astgrepr_0.0.9.tar.gz(r-4.5-noble)astgrepr_0.0.9.tar.gz(r-4.4-noble)
astgrepr.pdf |astgrepr.html✨
astgrepr/json (API)
NEWS
# Install 'astgrepr' in R: |
install.packages('astgrepr', repos = c('https://etiennebacher.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/etiennebacher/astgrepr/issues
Pkgdown:https://astgrepr.etiennebacher.com
Last updated 7 hours agofrom:ea91137bdb. Checks:OK: 8. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Dec 21 2024 |
R-4.5-win-x86_64 | OK | Dec 21 2024 |
R-4.5-linux-x86_64 | OK | Dec 21 2024 |
R-4.4-win-x86_64 | OK | Dec 21 2024 |
R-4.4-mac-x86_64 | OK | Dec 21 2024 |
R-4.4-mac-aarch64 | OK | Dec 21 2024 |
R-4.3-win-x86_64 | OK | Dec 21 2024 |
R-4.3-mac-aarch64 | OK | Dec 21 2024 |
Exports:ast_ruleexpect_snapshotnode_ancestorsnode_childnode_childrennode_findnode_find_allnode_followsnode_get_matchnode_get_multiple_matchesnode_get_rootnode_hasnode_insidenode_is_leafnode_is_namednode_is_named_leafnode_kindnode_matchesnode_nextnode_next_allnode_parentnode_precedesnode_prevnode_prev_allnode_rangenode_range_allnode_replacenode_replace_allnode_textnode_text_allpattern_rulerelational_ruletree_newtree_rewritetree_root
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Build a rule | ast_rule |
Recover the tree root from a node | node_get_root |
Find the kind of a node | node_kind |
Find node(s) matching a pattern | node-find node_find node_find_all |
Change the code in the tree | node-fix node_replace node_replace_all |
Get the match(es) from a meta-variable | node-get-match node_get_match node_get_multiple_matches |
Get more precise information on a node | node-info node_follows node_has node_inside node_matches node_precedes |
Get information on nodes | node-is node_is_leaf node_is_named node_is_named_leaf |
Get the start and end positions of a node | node-range node_range node_range_all |
Extract the code corresponding to one or several nodes | node-text node_text node_text_all |
Navigate the tree | node-traversal node_ancestors node_child node_children node_next node_next_all node_parent node_prev node_prev_all |
Build a pattern rule | pattern_rule |
Build a relational rule | relational_rule |
Create a syntax tree | tree_new |
Rewrite the tree with a list of replacements | tree_rewrite |
Get the root of the syntax tree | tree_root |