Skip to content

Commit

Permalink
Elm,Units: Type and constructor tags exclude parameters etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
niksilver committed Feb 14, 2022
1 parent 38c046d commit bad9fe8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Units/simple-elm.d/expected.tags
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Maybe input.elm /^import Maybe exposing (withDefault)$/;" m roles:imported
Je input.elm /^import Json.Encode as Je$/;" n roles:def
Thing input.elm /^type Thing$/;" t roles:def
One input.elm /^ = One$/;" c type:Thing roles:def
Two Int input.elm /^ | Two Int$/;" c type:Thing roles:def
Param a input.elm /^type Param a$/;" t roles:def
Cons a input.elm /^ = Cons a$/;" c type:Param a roles:def
Other a input.elm /^ | Other a$/;" c type:Param a roles:def
Two input.elm /^ | Two Int$/;" c type:Thing roles:def
Param input.elm /^type Param a$/;" t roles:def
Cons input.elm /^ = Cons a$/;" c type:Param roles:def
Other input.elm /^ | Other a$/;" c type:Param roles:def
Num input.elm /^type alias Num =$/;" a roles:def
outward input.elm /^port outward : String -> Cmd a$/;" p roles:def
inward input.elm /^port inward : (b -> a) -> Sub a$/;" p roles:def
Expand Down
4 changes: 2 additions & 2 deletions optlib/elm.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ extern parserDefinition* ElmParser (void)
"m", "{scope=clear}{exclusive}{_role=imported}", NULL, false},
{"^port[[:blank:]]+([[:lower:]][[:alnum:]_]*).*", "\\1",
"p", "{scope=clear}{exclusive}", NULL, false},
{"^type +([[:upper:]][[:alnum:]_]*.*)", "\\1",
{"^type +([[:upper:]][[:alnum:]_]*).*", "\\1",
"t", "{scope=set}{exclusive}", NULL, false},
{"^[[:blank:]]+[|=][[:blank:]]+([[:upper:]][[:alnum:]_]*.*)$", "\\1",
{"^[[:blank:]]+[|=][[:blank:]]+([[:upper:]][[:alnum:]_]*).*$", "\\1",
"c", "{scope=ref}{exclusive}", NULL, false},
{"^type[[:blank:]]+alias[[:blank:]]+([[:upper:]][[:alnum:]_]*[[:blank:][:alnum:]_]*)", "\\1",
"a", "{scope=set}{exclusive}", NULL, false},
Expand Down
4 changes: 2 additions & 2 deletions optlib/elm.ctags
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
--regex-Elm=/^import[[:blank:]]+([[:alnum:]_.]+)[[:blank:]]exposing/\1/m/{scope=clear}{exclusive}{_role=imported}
--regex-Elm=/^import[[:blank:]]+([[:alnum:]_.]+)/\1/m/{scope=clear}{exclusive}{_role=imported}
--regex-Elm=/^port[[:blank:]]+([[:lower:]][[:alnum:]_]*).*/\1/p/{scope=clear}{exclusive}
--regex-Elm=/^type +([[:upper:]][[:alnum:]_]*.*)/\1/t/{scope=set}{exclusive}
--regex-Elm=/^[[:blank:]]+[|=][[:blank:]]+([[:upper:]][[:alnum:]_]*.*)$/\1/c/{scope=ref}{exclusive}
--regex-Elm=/^type +([[:upper:]][[:alnum:]_]*).*/\1/t/{scope=set}{exclusive}
--regex-Elm=/^[[:blank:]]+[|=][[:blank:]]+([[:upper:]][[:alnum:]_]*).*$/\1/c/{scope=ref}{exclusive}
--regex-Elm=/^type[[:blank:]]+alias[[:blank:]]+([[:upper:]][[:alnum:]_]*[[:blank:][:alnum:]_]*)/\1/a/{scope=set}{exclusive}
--regex-Elm=/^([[:lower:]_][[:alnum:]_]*)[^=]*=$/\1/f/{scope=set}
--regex-Elm=/^[[:blank:]]+([[:lower:]_][[:alnum:]_]*)[^=]*=$/\1/f/{scope=ref}

0 comments on commit bad9fe8

Please sign in to comment.