diff options
author | alon@honor <none@none> | 2010-08-29 20:57:43 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-08-29 20:57:43 -0700 |
commit | 7f6a38d25ccb93c33a2a26e904557a85c93adb91 (patch) | |
tree | dffc7cfc752ba478d6ec8f623e6a0497ffaba8cb | |
parent | 7a0103b77e09097aa73ee8e137d826e6049bd2ac (diff) |
bugfix: void (...) detected as a function type
-rw-r--r-- | src/parser.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parser.js b/src/parser.js index 2d61b1b3..12d7e1dd 100644 --- a/src/parser.js +++ b/src/parser.js @@ -80,10 +80,15 @@ function isPointerType(type) { // TODO! return pointingLevels(type) > 0; } +function isVoidType(type) { + return type == 'void'; +} + function isType(type) { // TODO! - return isNumberType(type) || isStructType(type) || isPointerType(type); + return isVoidType(type) || isNumberType(type) || isStructType(type) || isPointerType(type); } +// Detects a function definition, ([...|type,[type,...]]) function isFunctionDef(token) { var text = token.text; var pointing = pointingLevels(text); |