Skip to content

Commit 067ba4e

Browse files
committed
Support for module.exports functions
This fixes romainl#10.
1 parent aa460a3 commit 067ba4e

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ TODO:
178178
--regex-javascript=/^[ \t]*var[ \t]\{1,\}\([a-z][A-Za-z0-9_$]\{1,\}\)[ \t]*=[ \t]*([^\*]/\1/F,Function,Functions/b
179179
--regex-javascript=/^[ \t]*let[ \t]\{1,\}\([a-z][A-Za-z0-9_$]\{1,\}\)[ \t]*=[ \t]*([^\*]/\1/F,Function,Functions/b
180180
--regex-javascript=/^[ \t]*const[ \t]\{1,\}\([a-z][A-Za-z0-9_$]\{1,\}\)[ \t]*=[ \t]*([^\*]/\1/F,Function,Functions/b
181+
--regex-javascript=/^[ \t]*module\.exports[ \t]*=[ \t]*function[ \t]\{1,\}\([a-z][A-Za-z0-9_$]\{1,\}\)/\1/F,Function,Functions/b
181182

182183
### Support
183184

@@ -188,6 +189,7 @@ TODO:
188189
var func_name = function() {... | func_name | F
189190
let func_name = function() {... | func_name | F
190191
const func_name = function() {... | func_name | F
192+
module.exports = function func_name() {... | func_name | F
191193

192194

193195
## Constructors and classes

ctagsrc

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
--regex-javascript=/^[ \t]*var[ \t]\{1,\}\([a-z][A-Za-z0-9_$]\{1,\}\)[ \t]*=[ \t]*([^)]*$/\1/F,Function,Functions/b
4747
--regex-javascript=/^[ \t]*let[ \t]\{1,\}\([a-z][A-Za-z0-9_$]\{1,\}\)[ \t]*=[ \t]*([^)]*$/\1/F,Function,Functions/b
4848
--regex-javascript=/^[ \t]*const[ \t]\{1,\}\([a-z][A-Za-z0-9_$]\{1,\}\)[ \t]*=[ \t]*([^)]*$/\1/F,Function,Functions/b
49+
--regex-javascript=/^[ \t]*module\.exports[ \t]*=[ \t]*function[ \t]\{1,\}\([a-z][A-Za-z0-9_$]\{1,\}\)/\1/F,Function,Functions/b
4950

5051
--regex-javascript=/^[ \t]*var[ \t]\{1,\}\([a-z][A-Za-z0-9_$]\{1,\}\)[ \t]*=[^=]*=>/\1/F,Function,Functions/b
5152
--regex-javascript=/^[ \t]*let[ \t]\{1,\}\([a-z][A-Za-z0-9_$]\{1,\}\)[ \t]*=[^=]*=>/\1/F,Function,Functions/b

index.js

+3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ var function_arrow_multiline = (
9999
) => {
100100
return 1;
101101
};
102+
module.exports = function mod_exports_func() {
103+
return 4;
104+
};
102105

103106

104107
// generators

0 commit comments

Comments
 (0)