aboutsummaryrefslogtreecommitdiff
path: root/src/parseTools.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-09-06 14:26:05 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-09-06 14:26:05 -0700
commit921a5d81d1c8a6edb35a0614049161901ef6ec74 (patch)
treeb0fc52bc8878b0120c1468dcbba577f23c4ec09d /src/parseTools.js
parentd52f7f8a7b05c5b46fc99526cd8a6b2bf270bc85 (diff)
handle anonymous packed struct types
Diffstat (limited to 'src/parseTools.js')
-rw-r--r--src/parseTools.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 3d747aec..311f1f22 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -115,7 +115,7 @@ function isStructPointerType(type) {
function isStructType(type) {
if (isPointerType(type)) return false;
if (new RegExp(/^\[\d+\ x\ (.*)\]/g).test(type)) return true; // [15 x ?] blocks. Like structs
- if (new RegExp(/{ [^}]* }/g).test(type)) return true; // { i32, i8 } etc. - anonymous struct types
+ if (new RegExp(/<?{ [^}]* }>?/g).test(type)) return true; // { i32, i8 } etc. - anonymous struct types
// See comment in isStructPointerType()
return !Runtime.isNumberType(type) && type[0] == '%';
}