mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-08-17 12:00:29 +03:00
Update docs for moduleNameAt
This commit is contained in:
parent
2a8dbaf2a1
commit
93d401d0a4
@ -38,11 +38,11 @@ type alias ModuleNameLookupTable =
|
||||
The function returns `Just []` if the type or value was defined in this module. It returns `Just moduleName` if the Node is among these kinds of AST nodes (and `Nothing` for all the others):
|
||||
|
||||
- `Expression.FunctionOrValue`
|
||||
- `Expression.PrefixOperator`
|
||||
- `Expression.OperatorApplication`
|
||||
- `nodeForTheName` in `Expression.RecordUpdateExpression nodeForTheName modifiers`
|
||||
- `nodeForTheName` in `TypeAnnotation.Typed nodeForTheName args`
|
||||
- `Pattern.NamedPattern`
|
||||
- `Expression.PrefixOperator`
|
||||
- `Expression.OperatorApplication`
|
||||
|
||||
```elm
|
||||
expressionVisitor : Node Expression -> Context -> ( List (Error {}), Context )
|
||||
@ -74,7 +74,7 @@ moduleNameFor (Internal.ModuleNameLookupTable dict) (Node range _) =
|
||||
Dict.get (Internal.toRangeLike range) dict
|
||||
|
||||
|
||||
{-| Returns the name of the module the type or value referred to by this [`Node`](https://package.elm-lang.org/packages/stil4m/elm-syntax/7.2.1/Elm-Syntax-Node#Node).
|
||||
{-| Returns the name of the module the type, value, or operator referred to by this [`Range`](https://package.elm-lang.org/packages/stil4m/elm-syntax/7.2.1/Elm-Syntax-Range#Range).
|
||||
|
||||
The function returns `Just []` if the type or value was defined in this module. It returns `Just moduleName` if the Node is among these kinds of AST nodes (and `Nothing` for all the others):
|
||||
|
||||
@ -82,6 +82,8 @@ The function returns `Just []` if the type or value was defined in this module.
|
||||
- `nodeForTheName` in `Expression.RecordUpdateExpression nodeForTheName modifiers`
|
||||
- `nodeForTheName` in `TypeAnnotation.Typed nodeForTheName args`
|
||||
- `Pattern.NamedPattern`
|
||||
- `Expression.PrefixOperator`
|
||||
- `Expression.OperatorApplication`
|
||||
|
||||
```elm
|
||||
expressionVisitor : Node Expression -> Context -> ( List (Error {}), Context )
|
||||
|
Loading…
Reference in New Issue
Block a user