aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-08-31 18:17:39 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-08-31 18:17:39 -0700
commit29b2f2450a76096d2f9c3a96d07e832b29b1de86 (patch)
treeda06aea74cb4b3b43c5b6837ed445c09f03d8005
parentb2dfbe2ca1811afd89d939fda2fa24ec5a2715c8 (diff)
merge tokens with }* }** etc., as they can be types of anonymous structs
-rw-r--r--src/intertyper.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 248aad36..71b19223 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -142,7 +142,7 @@ function intertyper(data, parseFunctions, baseLineNum) {
// merge certain tokens
if (lastToken && isType(lastToken.text) && isFunctionDef(token)) {
lastToken.text += ' ' + text;
- } else if (lastToken && text[text.length-1] == '}') {
+ } else if (lastToken && /^}\**$/.exec(text)) { // }, }*, etc.
var openBrace = tokens.length-1;
while (tokens[openBrace].text.substr(-1) != '{') openBrace --;
token = combineTokens(tokens.slice(openBrace+1));