ql.io-compiler
Advanced tools
Comparing version 0.8.4 to 0.8.5
@@ -27,3 +27,3 @@ /* | ||
var cache = {}; | ||
exports.compile = function(script) { | ||
exports.compile = function(script, loaded) { | ||
assert.ok(script, 'script is undefined'); | ||
@@ -35,2 +35,3 @@ | ||
cooked = cache[cacheKey]; | ||
cache['_tables'] = loaded | ||
if(cooked) { | ||
@@ -449,33 +450,29 @@ return cooked; | ||
refname = from.name.substring(1, from.name.length - 1); | ||
dependency = symbols[refname]; | ||
if(dependency) { | ||
if(line.assign === refname) { | ||
throw new this.SyntaxError('Circular reference ' + line.assign); | ||
} | ||
else { | ||
if(parent) { | ||
addDep(parent, parent.dependsOn, dependency, symbols); | ||
} | ||
else { | ||
addDep(line, line.dependsOn, dependency, symbols); | ||
} | ||
} | ||
} | ||
} | ||
else if(symbols[from.name]) { | ||
refname = from.name | ||
dependency = symbols[refname]; | ||
if(dependency) { | ||
if(line.assign === refname) { | ||
throw new this.SyntaxError('Circular reference ' + line.assign); | ||
} | ||
dependency = symbols[refname]; | ||
if(dependency) { | ||
if(line.assign === refname) { | ||
throw new this.SyntaxError('Circular reference ' + line.assign); | ||
} | ||
else { | ||
if(parent) { | ||
addDep(parent, parent.dependsOn, dependency, symbols); | ||
} | ||
else { | ||
if(parent) { | ||
addDep(parent, parent.dependsOn, dependency, symbols); | ||
} | ||
else { | ||
addDep(line, line.dependsOn, dependency, symbols); | ||
} | ||
addDep(line, line.dependsOn, dependency, symbols); | ||
} | ||
} | ||
var hasverb = dependency[line.type]; | ||
if(hasverb && hasverb.expect){ | ||
line.expects = hasverb.expect; | ||
} | ||
}else{ | ||
if(cache['_tables'] && cache['_tables'][from.name] && cache['_tables'][from.name].verbs && cache['_tables'][from.name].verbs[line.type] && cache['_tables'][from.name].verbs[line.type].expects){ | ||
line.expects = fromTable; | ||
} | ||
} | ||
@@ -482,0 +479,0 @@ } |
{ | ||
"author": "ql.io", | ||
"name": "ql.io-compiler", | ||
"version": "0.8.4", | ||
"version": "0.8.5", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
524419
10251
1