Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elm,Units: Type and constructor tags exclude parameters etc. #3297

Merged
merged 1 commit into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}