Dogma.Script
This module provides the struct that we use to reprisent source files, their abstract syntax tree, etc, as well as a few convenient functions for working with them.
Summary
parse(source, path) | Builds a Script struct from the given source code and path |
run_tests(script, rule_module \\ nil) | Runs each of the rules Rules.list on the given script |
walk(script, fun) | Postwalks the AST, calling the given |
Functions
Builds a Script struct from the given source code and path
Runs each of the rules Rules.list on the given script
Postwalks the AST, calling the given fun/2
on each.
script.errors is used as an accumulator for fun/2
, the script with the new
errors is returned.
fun/2
should take a node and the errors accumulator as arguments, and
return {node, errors}