diff --git a/Units/regex-flag-anonymous-gnu.d/args.ctags b/Units/regex-flag-anonymous-gnu.d/args.ctags index 2d55e1ac39..5d904aafa3 100644 --- a/Units/regex-flag-anonymous-gnu.d/args.ctags +++ b/Units/regex-flag-anonymous-gnu.d/args.ctags @@ -5,6 +5,6 @@ --kinddef-foo=m,module,modules --kinddef-foo=x,exception,exceptions ---regex-foo=/^defmodule *([a-zA-Z0-9]+) *do/\1/m/{scope=push} +--regex-foo=/^defmodule\s*(\w+)\s*do/\1/m/{scope=push} --regex-foo=/^end//{scope=pop}{placeholder} ---regex-foo=/ +defexception( +.*)$//x/{_anonymous=exception}{scope=ref} +--regex-foo=/\s+defexception(\s+.*)$//x/{_anonymous=exception}{scope=ref} diff --git a/Units/regex-flag-anonymous-gnu.d/expected.tags b/Units/regex-flag-anonymous-gnu.d/expected.tags index 4f0fc29e54..1624b61280 100644 --- a/Units/regex-flag-anonymous-gnu.d/expected.tags +++ b/Units/regex-flag-anonymous-gnu.d/expected.tags @@ -1,4 +1,4 @@ MyAppError1 input.foo /^defmodule MyAppError1 do$/;" m -exceptionf9e1959f0101 input.foo /^ defexception [:message]$/;" x module:MyAppError1 +exception4808aff60101 input.foo /^ defexception [:message]$/;" x module:MyAppError1 MyAppError2 input.foo /^defmodule MyAppError2 do$/;" m -exceptionf9e1959f0201 input.foo /^ defexception [:message]$/;" x module:MyAppError2 +exception4808aff60201 input.foo /^ defexception [:message]$/;" x module:MyAppError2 diff --git a/Units/regex-multiline-flag-dos-gnu.d/args.ctags b/Units/regex-multiline-flag-dos-gnu.d/args.ctags index ef6f0538d2..37898a2fc5 100644 --- a/Units/regex-multiline-flag-dos-gnu.d/args.ctags +++ b/Units/regex-multiline-flag-dos-gnu.d/args.ctags @@ -1,6 +1,6 @@ # Taken from #1473 opened by WillDHB --langdef=mltest ---mline-regex-mltest=/@subscribe([[:space:]])*([a-z ]+)[[:space:]]*([a-zA-Z]*)\(([a-zA-Z]*)/\3-\4/s,subscription/{mgroup=3} +--mline-regex-mltest=/@subscribe\s*[a-z ]+\s*([a-zA-Z]*)\(([a-zA-Z]*)/\1-\2/s,subscription/{mgroup=1} --excmd=mixed --fields=+ln --language-force=mltest diff --git a/Units/regex-multiline-flag-gnu.d/args.ctags b/Units/regex-multiline-flag-gnu.d/args.ctags index 6b1dbbd8fb..d73690a63a 100644 --- a/Units/regex-multiline-flag-gnu.d/args.ctags +++ b/Units/regex-multiline-flag-gnu.d/args.ctags @@ -1,5 +1,5 @@ --langdef=javaspring --langmap=javaspring:.java ---mline-regex-javaspring=/@Subscribe([[:space:]])*([a-z ]+)[[:space:]]*([a-zA-Z]*)\(([a-zA-Z]*)/\3-\4/s,subscription/{mgroup=3} +--mline-regex-javaspring=/@Subscribe\s*[a-z ]+\s*([a-zA-Z]*)\(([a-zA-Z]*)/\1-\2/s,subscription/{mgroup=1} --excmd=mixed --fields=+ln diff --git a/Units/regex-multiline-flag-hat-and-doller-gnu.d/args.ctags b/Units/regex-multiline-flag-hat-and-doller-gnu.d/args.ctags index b340596bd6..2fca370548 100644 --- a/Units/regex-multiline-flag-hat-and-doller-gnu.d/args.ctags +++ b/Units/regex-multiline-flag-hat-and-doller-gnu.d/args.ctags @@ -2,6 +2,6 @@ --langmap=FOOBAR:.foobar --kinddef-FOOBAR=d,def,definitions --kinddef-FOOBAR=D,Def,Definitions ---mline-regex-foobar=/^def[\n\t ]+([a-z]+)$/\1/d/{mgroup=1} ---mline-regex-foobar=/[\n]?def[\n\t ]+([a-z]+)\n/\1/D/{mgroup=1} +--mline-regex-foobar=/^def\s+([a-z]+)$/\1/d/{mgroup=1} +--mline-regex-foobar=/[\n]?def\s+([a-z]+)\n/\1/D/{mgroup=1} --fields=+ln diff --git a/Units/regex-multiline-flag-newline-gnu.d/args.ctags b/Units/regex-multiline-flag-newline-gnu.d/args.ctags index d299d566f0..8398b5ab36 100644 --- a/Units/regex-multiline-flag-newline-gnu.d/args.ctags +++ b/Units/regex-multiline-flag-newline-gnu.d/args.ctags @@ -1,5 +1,5 @@ --langdef=FOOBAR --langmap=FOOBAR:.foobar --kinddef-FOOBAR=d,def,definitions ---mline-regex-foobar=/^def((\n[\n\t])|(: ))([a-z0-9-]+)/\4/d/{mgroup=4} +--mline-regex-foobar=/^def(\n[\n\t]|: )(\w+)/\2/d/{mgroup=2} --fields=+ln diff --git a/Units/regex-with-scope-autoFQTag-gnu.d/args.ctags b/Units/regex-with-scope-autoFQTag-gnu.d/args.ctags index fcdb2b8b1f..2eb85a84b7 100644 --- a/Units/regex-with-scope-autoFQTag-gnu.d/args.ctags +++ b/Units/regex-with-scope-autoFQTag-gnu.d/args.ctags @@ -6,11 +6,11 @@ --langdef=foo{_autoFQTag} --map-foo=+.foo --regex-foo=/^#.*//{exclusive} - --regex-foo=/^[[:blank:]]*define[[:blank:]]+([[:alnum:]_]+)[[:blank:]]*\{/\1/d,definition/{scope=push} - --regex-foo=/^[[:blank:]]*\{/_/d,definition/{scope=push}{placeholder} - --regex-foo=/^[[:blank:]]*package[[:blank:]]+([[:alnum:]_]+)/\1/p,package/{scope=push} - --regex-foo=/^[[:blank:]]*end[[:blank:]]*$//{scope=pop}{exclusive} - --regex-foo=/^[[:blank:]]*\}[[:blank:]]*$//{scope=pop}{exclusive} - --regex-foo=/^[[:blank:]]*ns[[:blank:]]+([[:alnum:]_]+)/\1/n,namespace/{scope=set} - --regex-foo=/^[[:blank:]]*var[[:blank:]]+([[:alnum:]_]+)/\1/v,var/{scope=ref} - --regex-foo=/^[[:blank:]]*global//{scope=clear}{exclusive} + --regex-foo=/^\s*define\s+(\w+)\s*\{/\1/d,definition/{scope=push} + --regex-foo=/^\s*\{/_/d,definition/{scope=push}{placeholder} + --regex-foo=/^\s*package\s+(\w+)/\1/p,package/{scope=push} + --regex-foo=/^\s*end\s*$//{scope=pop}{exclusive} + --regex-foo=/^\s*\}\s*$//{scope=pop}{exclusive} + --regex-foo=/^\s*ns\s+(\w+)/\1/n,namespace/{scope=set} + --regex-foo=/^\s*var\s+(\w+)/\1/v,var/{scope=ref} + --regex-foo=/^\s*global//{scope=clear}{exclusive} diff --git a/Units/regex-with-scope-gnu.d/args.ctags b/Units/regex-with-scope-gnu.d/args.ctags index 77615282ab..3b053e1b92 100644 --- a/Units/regex-with-scope-gnu.d/args.ctags +++ b/Units/regex-with-scope-gnu.d/args.ctags @@ -4,11 +4,11 @@ --langdef=foo --map-foo=+.foo --regex-foo=/^#.*//{exclusive} - --regex-foo=/^[[:blank:]]*define[[:blank:]]+([[:alnum:]_]+)[[:blank:]]*\{/\1/d,definition/{scope=push} - --regex-foo=/^[[:blank:]]*\{/_/d,definition/{scope=push}{placeholder} - --regex-foo=/^[[:blank:]]*package[[:blank:]]+([[:alnum:]_]+)/\1/p,package/{scope=push} - --regex-foo=/^[[:blank:]]*end[[:blank:]]*$//{scope=pop}{exclusive} - --regex-foo=/^[[:blank:]]*\}[[:blank:]]*$//{scope=pop}{exclusive} - --regex-foo=/^[[:blank:]]*ns[[:blank:]]+([[:alnum:]_]+)/\1/n,namespace/{scope=set} - --regex-foo=/^[[:blank:]]*var[[:blank:]]+([[:alnum:]_]+)/\1/v,var/{scope=ref} - --regex-foo=/^[[:blank:]]*global//{scope=clear}{exclusive} + --regex-foo=/^\s*define\s+(\w+)\s*\{/\1/d,definition/{scope=push} + --regex-foo=/^\s*\{/_/d,definition/{scope=push}{placeholder} + --regex-foo=/^\s*package\s+(\w+)/\1/p,package/{scope=push} + --regex-foo=/^\s*end\s*$//{scope=pop}{exclusive} + --regex-foo=/^\s*\}\s*$//{scope=pop}{exclusive} + --regex-foo=/^\s*ns\s+(\w+)/\1/n,namespace/{scope=set} + --regex-foo=/^\s*var\s+(\w+)/\1/v,var/{scope=ref} + --regex-foo=/^\s*global//{scope=clear}{exclusive} diff --git a/Units/regex-with-scope-nested-gnu.d/args.ctags b/Units/regex-with-scope-nested-gnu.d/args.ctags index 502137fa7f..0e716091e1 100644 --- a/Units/regex-with-scope-nested-gnu.d/args.ctags +++ b/Units/regex-with-scope-nested-gnu.d/args.ctags @@ -5,18 +5,18 @@ --langdef=foo --map-foo=+.foo --regex-foo=/^#.*//{exclusive} - --regex-foo=/^[[:blank:]]*define[[:blank:]]+([[:alnum:]_]+)[[:blank:]]*\{/\1/d,definition/{scope=push} - --regex-foo=/^[[:blank:]]*\{/_/d,definition/{scope=push}{placeholder} - --regex-foo=/^[[:blank:]]*package[[:blank:]]+([[:alnum:]_]+)/\1/p,package/{scope=push} - --regex-foo=/^[[:blank:]]*end[[:blank:]]*$//{scope=pop}{exclusive} - --regex-foo=/^[[:blank:]]*\}[[:blank:]]*$//{scope=pop}{exclusive} - --regex-foo=/^[[:blank:]]*ns[[:blank:]]+([[:alnum:]_]+)/\1/n,namespace/{scope=set} - --regex-foo=/^[[:blank:]]*var[[:blank:]]+([[:alnum:]_]+)/\1/v,var/{scope=ref} - --regex-foo=/^[[:blank:]]*global//{scope=clear}{exclusive} + --regex-foo=/^\s*define\s+(\w+)\s*\{/\1/d,definition/{scope=push} + --regex-foo=/^\s*\{/_/d,definition/{scope=push}{placeholder} + --regex-foo=/^\s*package\s+(\w+)/\1/p,package/{scope=push} + --regex-foo=/^\s*end\s*$//{scope=pop}{exclusive} + --regex-foo=/^\s*\}\s*$//{scope=pop}{exclusive} + --regex-foo=/^\s*ns\s+(\w+)/\1/n,namespace/{scope=set} + --regex-foo=/^\s*var\s+(\w+)/\1/v,var/{scope=ref} + --regex-foo=/^\s*global//{scope=clear}{exclusive} --langdef=bar{base=foo} --kinddef-bar=s,scope,scopes --kinddef-bar=d,definition,definitions - --regex-bar=/^# open:([[:alnum:]_]+)/\1/s/{scope=push} - --regex-bar=/^# def:([[:alnum:]_]+)/\1/d/{scope=ref} + --regex-bar=/^# open:(\w+)/\1/s/{scope=push} + --regex-bar=/^# def:(\w+)/\1/d/{scope=ref} --regex-bar=/^# close//{scope=pop}{exclusive}