Skip to content

0.6.0

Choose a tag to compare

@dannote dannote released this 27 Apr 15:44
· 24 commits to master since this release

Added

  • CSS-like AST selectors — build relationship-aware selectors with ExAST.Selector
    import Kernel, except: [not: 1]
    import ExAST.Selector
    
    pattern("defmodule _ do ... end")
    |> descendant("def _ do ... end")
    |> child("IO.inspect(_)")
  • Selector predicates — filter selected nodes with where/2 and Ecto-style not/1
    • parent/1 / parent/2
    • ancestor/1 / ancestor/2
    • has_child/1 / has_child/2
    • has_descendant/1 / has_descendant/2
    • has/1 / has/2
  • CLI relationship filters for mix ex_ast.search and mix ex_ast.replace
    • --parent, --ancestor, --has-child, --has-descendant, --has
    • matching --not-* flags