diff options
author | Alon Zakai <azakai@mozilla.com> | 2010-11-13 18:11:39 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2010-11-13 18:11:39 -0800 |
commit | 0d1ff8042b13df96ae0b67c126b7637cd46dfd5f (patch) | |
tree | e2531af0db5d6ff9193cd2d58735264d80c0deee /src/parseTools.js | |
parent | 1b153b74662b198f99a1b7e21d8bc60f562f6feb (diff) |
recognize varargs in function pointer types
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 668eb56b..542f97dd 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -92,12 +92,12 @@ function isFunctionDef(token) { var nonPointing = removeAllPointing(text); if (nonPointing[0] != '(' || nonPointing.substr(-1) != ')') return false; - if (nonPointing in set('()', '(...)')) return true; + if (nonPointing === '()') return true; if (!token.item) return false; var fail = false; splitTokenList(token.item.tokens).forEach(function(segment) { - var subtoken = segment[0]; - fail = fail || !isType(subtoken.text) || segment.length > 1; + var subtext = segment[0].text; + fail = fail || segment.length > 1 || !(isType(subtext) || subtext == '...'); }); return !fail; } |