elm-review/Types.elm
2017-01-15 23:30:33 +01:00

33 lines
713 B
Elm

module Types exposing (..)
import Ast.Expression exposing (..)
import Ast.Statement exposing (..)
type alias Error =
{ rule : String
, message : String
}
type Direction node
= Enter node
| Exit node
type alias LintImplementation nodeType context =
context -> Direction nodeType -> ( List Error, context )
type alias LintRule context =
{ statementFn : LintImplementation Statement context
, typeFn : LintImplementation Type context
, expressionFn : LintImplementation Expression context
, moduleEndFn : context -> ( List Error, context )
, initialContext : context
}
type alias Visitor context =
LintRule context -> context -> ( List Error, context )