diff --git a/lib/config.coffee b/lib/config.coffee index 4790510..2ba0115 100644 --- a/lib/config.coffee +++ b/lib/config.coffee @@ -42,7 +42,7 @@ module.exports = "(^|\\s)(static\\s+)?((public|private|protected)\\s+)?(static\\s+)?function\\s+{word}\\s*\\(" ] type: ["*.php"] - + Hack: regex: [ "(^|\\s)class\\s+{word}(\\s|{|$)" @@ -74,3 +74,14 @@ module.exports = "(^|\\s)package\\s+(\\w+::)*{word}\\s*\\;" ] type: ["*.pm","*.pl"] + + 'C/C++': + regex: [ + "(^|\\s)class\\s+{word}(\\s|:)" + "(^|\\s)struct\\s+{word}(\\s|{|$)" + "(^|\\s)enum\\s+{word}(\\s|{|$)" + "(^|\\s)#define\\s+{word}(\\s|\\(|$)" + "(^|\\s)typedef\\s.*(\\s|\\*|\\(){word}(\\s|;|\\)|$)" + "^[^,=/(]*[^,=/(\\s]+\\s*(\\s|\\*|:|&){word}\\s*\\(.*\\)(\\s*|\\s*const\\s*)({|$)" + ] + type: ["*.c","*.cc","*.cpp","*.h","*.hh","*.hpp","*.inc"]