mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-12-26 03:04:48 +03:00
31 lines
668 B
Elm
31 lines
668 B
Elm
module Types exposing (..)
|
|
|
|
import Ast.Expression exposing (..)
|
|
import Ast.Statement exposing (..)
|
|
|
|
|
|
type alias Error =
|
|
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 )
|
|
, context : context
|
|
}
|
|
|
|
|
|
type alias Visitor context =
|
|
LintRule context -> context -> ( List Error, context )
|