aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/intertyper.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 5af291c7..a5e6ccd9 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -69,11 +69,13 @@ function intertyper(data, sidePass, baseLineNums) {
if (mainPass && (line[0] == '%' || line[0] == '@')) {
// If this isn't a type, it's a global variable, make a note of the information now, we will need it later
- var testType = /[@%\w\d\.\" $-]+ = type .*/.exec(line);
+ var parts = line.split(' = ');
+ assert(parts.length >= 2);
+ var left = parts[0], right = parts.slice(1).join(' = ');
+ var testType = /^type .*/.exec(right);
if (!testType) {
- var global = /([@%\w\d\.\" $-]+) = .*/.exec(line);
- var globalIdent = toNiceIdent(global[1]);
- var testAlias = /[@%\w\d\.\" $-]+ = (hidden )?alias .*/.exec(line);
+ var globalIdent = toNiceIdent(left);
+ var testAlias = /^(hidden )?alias .*/.exec(right);
Variables.globals[globalIdent] = {
name: globalIdent,
alias: !!testAlias,