diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-23 10:16:32 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-23 10:16:32 -0800 |
commit | 3f8b4e23f754dd65c0b31709ee601388e70fcc89 (patch) | |
tree | 20506f52cbad94c9ac153360ac6f7fc77dc6145a /src/parseTools.js | |
parent | b40afadb4f35bb1df98fb8098c6b4edfe17dc6bd (diff) |
handle function pointer calls to functions that return function pointers (insert meme here)
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index a5939994..9bb7aec5 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -227,6 +227,10 @@ function isFunctionType(type, out) { return isFunctionDef({ text: argText, item: tokenize(argText.substr(1, argText.length-2), true) }, out); } +function getReturnType(type) { + return type.substr(0, type.lastIndexOf('(')-1); +} + var isTypeCache = {}; // quite hot, optimize as much as possible function isType(type) { if (type in isTypeCache) return isTypeCache[type]; |