Package: astgrepr 0.1.1
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.1.1.tar.gz
astgrepr_0.1.1.zip(r-4.7)astgrepr_0.1.1.zip(r-4.6)astgrepr_0.1.1.zip(r-4.5)
astgrepr_0.1.1.tgz(r-4.6-x86_64)astgrepr_0.1.1.tgz(r-4.6-arm64)astgrepr_0.1.1.tgz(r-4.5-x86_64)astgrepr_0.1.1.tgz(r-4.5-arm64)
astgrepr_0.1.1.tar.gz(r-4.7-arm64)astgrepr_0.1.1.tar.gz(r-4.7-x86_64)astgrepr_0.1.1.tar.gz(r-4.6-arm64)astgrepr_0.1.1.tar.gz(r-4.6-x86_64)
manual.pdf |manual.html✨
card.svg |card.png
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/docs site:https://astgrepr.etiennebacher.com
Last updated from:41d20ade42. Checks:10 OK, 2 WARNING, 1 FAIL. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | OK | 193 | ||
| linux-devel-x86_64 | OK | 177 | ||
| source / vignettes | OK | 277 | ||
| linux-release-arm64 | OK | 184 | ||
| linux-release-x86_64 | OK | 176 | ||
| macos-release-arm64 | WARNING | 191 | ||
| macos-release-x86_64 | WARNING | 283 | ||
| macos-oldrel-arm64 | OK | 146 | ||
| macos-oldrel-x86_64 | OK | 299 | ||
| windows-devel | OK | 207 | ||
| windows-release | OK | 210 | ||
| windows-oldrel | OK | 280 | ||
| wasm-release | FAIL | 154 |
Exports:ast_rulenode_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 |
