mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-08-16 19:40:22 +03:00
Handle variable case
This commit is contained in:
parent
c955278351
commit
ade886ddd1
@ -19,7 +19,7 @@ module Css.ClassFunction exposing
|
||||
import Elm.Syntax.Expression as Expression exposing (Expression)
|
||||
import Elm.Syntax.Node as Node exposing (Node)
|
||||
import Elm.Syntax.Range exposing (Range)
|
||||
import Review.ModuleNameLookupTable exposing (ModuleNameLookupTable)
|
||||
import Review.ModuleNameLookupTable as ModuleNameLookupTable exposing (ModuleNameLookupTable)
|
||||
|
||||
|
||||
type CssArgument
|
||||
@ -62,6 +62,14 @@ fromExpressionHelp lookupTable nodes acc =
|
||||
Expression.Literal str ->
|
||||
fromExpressionHelp lookupTable rest (Literal str :: acc)
|
||||
|
||||
Expression.FunctionOrValue [] name ->
|
||||
case ModuleNameLookupTable.moduleNameFor lookupTable node of
|
||||
Just [] ->
|
||||
fromExpressionHelp lookupTable rest (Variable (Node.range node) :: acc)
|
||||
|
||||
_ ->
|
||||
fromExpressionHelp lookupTable rest (UngraspableExpression (Node.range node) :: acc)
|
||||
|
||||
Expression.ParenthesizedExpression expr ->
|
||||
fromExpressionHelp lookupTable (expr :: rest) acc
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user