aboutsummaryrefslogtreecommitdiff
path: root/src/parser.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.js')
-rw-r--r--src/parser.js7
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);