diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | src/parseTools.js | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -122,4 +122,5 @@ a license to everyone to use it as detailed in LICENSE.) * James S Urquhart <jamesu@gmail.com> * Boris Gjenero <boris.gjenero@gmail.com> * jonas echterhoff <jonas@unity3d.com> +* Sami Vaarala <sami.vaarala@iki.fi> diff --git a/src/parseTools.js b/src/parseTools.js index bad080b7..fe56580e 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -162,7 +162,7 @@ function isArrayType(type) { function isStructType(type) { if (isPointerType(type)) return false; if (isArrayType(type)) return true; - if (/<?{ ?[^}]* ?}>?/.test(type)) return true; // { i32, i8 } etc. - anonymous struct types + if (/<?\{ ?[^}]* ?\}>?/.test(type)) return true; // { i32, i8 } etc. - anonymous struct types // See comment in isStructPointerType() return type[0] == '%'; } @@ -172,7 +172,7 @@ function isVectorType(type) { } function isStructuralType(type) { - return /^{ ?[^}]* ?}$/.test(type); // { i32, i8 } etc. - anonymous struct types + return /^\{ ?[^}]* ?\}$/.test(type); // { i32, i8 } etc. - anonymous struct types } function getStructuralTypeParts(type) { // split { i32, i8 } etc. into parts |