mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-25 10:04:38 +03:00
Handle variable case
This commit is contained in:
parent
733d1acd03
commit
5bed2f1439
@ -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