Skip to content

Commit c3bd3e1

Browse files
hirooihmasatake
authored andcommitted
Units: use GNU extension regex patterns
Some changes are not equivalent with original to try more use of extensions.
1 parent 5900955 commit c3bd3e1

File tree

9 files changed

+35
-35
lines changed

9 files changed

+35
-35
lines changed

Units/regex-flag-anonymous-gnu.d/args.ctags

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
--kinddef-foo=m,module,modules
66
--kinddef-foo=x,exception,exceptions
77

8-
--regex-foo=/^defmodule *([a-zA-Z0-9]+) *do/\1/m/{scope=push}
8+
--regex-foo=/^defmodule\s*(\w+)\s*do/\1/m/{scope=push}
99
--regex-foo=/^end//{scope=pop}{placeholder}
10-
--regex-foo=/ +defexception( +.*)$//x/{_anonymous=exception}{scope=ref}
10+
--regex-foo=/\s+defexception(\s+.*)$//x/{_anonymous=exception}{scope=ref}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
MyAppError1 input.foo /^defmodule MyAppError1 do$/;" m
2-
exceptionf9e1959f0101 input.foo /^ defexception [:message]$/;" x module:MyAppError1
2+
exception4808aff60101 input.foo /^ defexception [:message]$/;" x module:MyAppError1
33
MyAppError2 input.foo /^defmodule MyAppError2 do$/;" m
4-
exceptionf9e1959f0201 input.foo /^ defexception [:message]$/;" x module:MyAppError2
4+
exception4808aff60201 input.foo /^ defexception [:message]$/;" x module:MyAppError2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Taken from #1473 opened by WillDHB
22
--langdef=mltest
3-
--mline-regex-mltest=/@subscribe([[:space:]])*([a-z ]+)[[:space:]]*([a-zA-Z]*)\(([a-zA-Z]*)/\3-\4/s,subscription/{mgroup=3}
3+
--mline-regex-mltest=/@subscribe\s*[a-z ]+\s*([a-zA-Z]*)\(([a-zA-Z]*)/\1-\2/s,subscription/{mgroup=1}
44
--excmd=mixed
55
--fields=+ln
66
--language-force=mltest
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--langdef=javaspring
22
--langmap=javaspring:.java
3-
--mline-regex-javaspring=/@Subscribe([[:space:]])*([a-z ]+)[[:space:]]*([a-zA-Z]*)\(([a-zA-Z]*)/\3-\4/s,subscription/{mgroup=3}
3+
--mline-regex-javaspring=/@Subscribe\s*[a-z ]+\s*([a-zA-Z]*)\(([a-zA-Z]*)/\1-\2/s,subscription/{mgroup=1}
44
--excmd=mixed
55
--fields=+ln

Units/regex-multiline-flag-hat-and-doller-gnu.d/args.ctags

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
--langmap=FOOBAR:.foobar
33
--kinddef-FOOBAR=d,def,definitions
44
--kinddef-FOOBAR=D,Def,Definitions
5-
--mline-regex-foobar=/^def[\n\t ]+([a-z]+)$/\1/d/{mgroup=1}
6-
--mline-regex-foobar=/[\n]?def[\n\t ]+([a-z]+)\n/\1/D/{mgroup=1}
5+
--mline-regex-foobar=/^def\s+([a-z]+)$/\1/d/{mgroup=1}
6+
--mline-regex-foobar=/[\n]?def\s+([a-z]+)\n/\1/D/{mgroup=1}
77
--fields=+ln
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--langdef=FOOBAR
22
--langmap=FOOBAR:.foobar
33
--kinddef-FOOBAR=d,def,definitions
4-
--mline-regex-foobar=/^def((\n[\n\t])|(: ))([a-z0-9-]+)/\4/d/{mgroup=4}
4+
--mline-regex-foobar=/^def(\n[\n\t]|: )(\w+)/\2/d/{mgroup=2}
55
--fields=+ln

Units/regex-with-scope-autoFQTag-gnu.d/args.ctags

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
--langdef=foo{_autoFQTag}
77
--map-foo=+.foo
88
--regex-foo=/^#.*//{exclusive}
9-
--regex-foo=/^[[:blank:]]*define[[:blank:]]+([[:alnum:]_]+)[[:blank:]]*\{/\1/d,definition/{scope=push}
10-
--regex-foo=/^[[:blank:]]*\{/_/d,definition/{scope=push}{placeholder}
11-
--regex-foo=/^[[:blank:]]*package[[:blank:]]+([[:alnum:]_]+)/\1/p,package/{scope=push}
12-
--regex-foo=/^[[:blank:]]*end[[:blank:]]*$//{scope=pop}{exclusive}
13-
--regex-foo=/^[[:blank:]]*\}[[:blank:]]*$//{scope=pop}{exclusive}
14-
--regex-foo=/^[[:blank:]]*ns[[:blank:]]+([[:alnum:]_]+)/\1/n,namespace/{scope=set}
15-
--regex-foo=/^[[:blank:]]*var[[:blank:]]+([[:alnum:]_]+)/\1/v,var/{scope=ref}
16-
--regex-foo=/^[[:blank:]]*global//{scope=clear}{exclusive}
9+
--regex-foo=/^\s*define\s+(\w+)\s*\{/\1/d,definition/{scope=push}
10+
--regex-foo=/^\s*\{/_/d,definition/{scope=push}{placeholder}
11+
--regex-foo=/^\s*package\s+(\w+)/\1/p,package/{scope=push}
12+
--regex-foo=/^\s*end\s*$//{scope=pop}{exclusive}
13+
--regex-foo=/^\s*\}\s*$//{scope=pop}{exclusive}
14+
--regex-foo=/^\s*ns\s+(\w+)/\1/n,namespace/{scope=set}
15+
--regex-foo=/^\s*var\s+(\w+)/\1/v,var/{scope=ref}
16+
--regex-foo=/^\s*global//{scope=clear}{exclusive}

Units/regex-with-scope-gnu.d/args.ctags

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
--langdef=foo
55
--map-foo=+.foo
66
--regex-foo=/^#.*//{exclusive}
7-
--regex-foo=/^[[:blank:]]*define[[:blank:]]+([[:alnum:]_]+)[[:blank:]]*\{/\1/d,definition/{scope=push}
8-
--regex-foo=/^[[:blank:]]*\{/_/d,definition/{scope=push}{placeholder}
9-
--regex-foo=/^[[:blank:]]*package[[:blank:]]+([[:alnum:]_]+)/\1/p,package/{scope=push}
10-
--regex-foo=/^[[:blank:]]*end[[:blank:]]*$//{scope=pop}{exclusive}
11-
--regex-foo=/^[[:blank:]]*\}[[:blank:]]*$//{scope=pop}{exclusive}
12-
--regex-foo=/^[[:blank:]]*ns[[:blank:]]+([[:alnum:]_]+)/\1/n,namespace/{scope=set}
13-
--regex-foo=/^[[:blank:]]*var[[:blank:]]+([[:alnum:]_]+)/\1/v,var/{scope=ref}
14-
--regex-foo=/^[[:blank:]]*global//{scope=clear}{exclusive}
7+
--regex-foo=/^\s*define\s+(\w+)\s*\{/\1/d,definition/{scope=push}
8+
--regex-foo=/^\s*\{/_/d,definition/{scope=push}{placeholder}
9+
--regex-foo=/^\s*package\s+(\w+)/\1/p,package/{scope=push}
10+
--regex-foo=/^\s*end\s*$//{scope=pop}{exclusive}
11+
--regex-foo=/^\s*\}\s*$//{scope=pop}{exclusive}
12+
--regex-foo=/^\s*ns\s+(\w+)/\1/n,namespace/{scope=set}
13+
--regex-foo=/^\s*var\s+(\w+)/\1/v,var/{scope=ref}
14+
--regex-foo=/^\s*global//{scope=clear}{exclusive}

Units/regex-with-scope-nested-gnu.d/args.ctags

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
--langdef=foo
66
--map-foo=+.foo
77
--regex-foo=/^#.*//{exclusive}
8-
--regex-foo=/^[[:blank:]]*define[[:blank:]]+([[:alnum:]_]+)[[:blank:]]*\{/\1/d,definition/{scope=push}
9-
--regex-foo=/^[[:blank:]]*\{/_/d,definition/{scope=push}{placeholder}
10-
--regex-foo=/^[[:blank:]]*package[[:blank:]]+([[:alnum:]_]+)/\1/p,package/{scope=push}
11-
--regex-foo=/^[[:blank:]]*end[[:blank:]]*$//{scope=pop}{exclusive}
12-
--regex-foo=/^[[:blank:]]*\}[[:blank:]]*$//{scope=pop}{exclusive}
13-
--regex-foo=/^[[:blank:]]*ns[[:blank:]]+([[:alnum:]_]+)/\1/n,namespace/{scope=set}
14-
--regex-foo=/^[[:blank:]]*var[[:blank:]]+([[:alnum:]_]+)/\1/v,var/{scope=ref}
15-
--regex-foo=/^[[:blank:]]*global//{scope=clear}{exclusive}
8+
--regex-foo=/^\s*define\s+(\w+)\s*\{/\1/d,definition/{scope=push}
9+
--regex-foo=/^\s*\{/_/d,definition/{scope=push}{placeholder}
10+
--regex-foo=/^\s*package\s+(\w+)/\1/p,package/{scope=push}
11+
--regex-foo=/^\s*end\s*$//{scope=pop}{exclusive}
12+
--regex-foo=/^\s*\}\s*$//{scope=pop}{exclusive}
13+
--regex-foo=/^\s*ns\s+(\w+)/\1/n,namespace/{scope=set}
14+
--regex-foo=/^\s*var\s+(\w+)/\1/v,var/{scope=ref}
15+
--regex-foo=/^\s*global//{scope=clear}{exclusive}
1616

1717
--langdef=bar{base=foo}
1818
--kinddef-bar=s,scope,scopes
1919
--kinddef-bar=d,definition,definitions
20-
--regex-bar=/^# open:([[:alnum:]_]+)/\1/s/{scope=push}
21-
--regex-bar=/^# def:([[:alnum:]_]+)/\1/d/{scope=ref}
20+
--regex-bar=/^# open:(\w+)/\1/s/{scope=push}
21+
--regex-bar=/^# def:(\w+)/\1/d/{scope=ref}
2222
--regex-bar=/^# close//{scope=pop}{exclusive}

0 commit comments

Comments
 (0)