summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-12-01 01:32:41 -0600
committerkpdecker <kpdecker@gmail.com>2014-12-16 12:57:46 -0600
commit203df9d5b7cdd6eb9543c0544f08f37e1a77a223 (patch)
tree1c0879b7ddc7c8af711aa1a30f0bc5556afedaa9 /lib/handlebars/compiler
parent0d396ccd30b51d3c5ffb7fb3e79670d89b610163 (diff)
downloadhandlebars.js-203df9d5b7cdd6eb9543c0544f08f37e1a77a223.zip
handlebars.js-203df9d5b7cdd6eb9543c0544f08f37e1a77a223.tar.gz
handlebars.js-203df9d5b7cdd6eb9543c0544f08f37e1a77a223.tar.bz2
Remove unused vars and add jshint checking
Diffstat (limited to 'lib/handlebars/compiler')
-rw-r--r--lib/handlebars/compiler/ast.js2
-rw-r--r--lib/handlebars/compiler/compiler.js4
-rw-r--r--lib/handlebars/compiler/javascript-compiler.js1
-rw-r--r--lib/handlebars/compiler/printer.js2
-rw-r--r--lib/handlebars/compiler/visitor.js1
5 files changed, 3 insertions, 7 deletions
diff --git a/lib/handlebars/compiler/ast.js b/lib/handlebars/compiler/ast.js
index 0020216..3f4639c 100644
--- a/lib/handlebars/compiler/ast.js
+++ b/lib/handlebars/compiler/ast.js
@@ -1,5 +1,3 @@
-import Exception from "../exception";
-
var AST = {
Program: function(statements, blockParams, strip, locInfo) {
this.loc = locInfo;
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index 71e0ccf..2c0bd08 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -18,8 +18,6 @@ function scopedId(path) {
// an ID is simple if it only has one part, and that part is not
// `..` or `this`.
function simpleId(path) {
- var part = path.parts[0];
-
return path.parts.length === 1 && !scopedId(path) && !path.depth;
}
@@ -93,7 +91,7 @@ Compiler.prototype = {
compileProgram: function(program) {
var result = new this.compiler().compile(program, this.options);
- var guid = this.guid++, depth;
+ var guid = this.guid++;
this.usePartial = this.usePartial || result.usePartial;
diff --git a/lib/handlebars/compiler/javascript-compiler.js b/lib/handlebars/compiler/javascript-compiler.js
index dfe2df1..356424b 100644
--- a/lib/handlebars/compiler/javascript-compiler.js
+++ b/lib/handlebars/compiler/javascript-compiler.js
@@ -755,7 +755,6 @@ JavaScriptCompiler.prototype = {
replaceStack: function(callback) {
var prefix = ['('],
- inline = this.isInline(),
stack,
createdStack,
usedLiteral;
diff --git a/lib/handlebars/compiler/printer.js b/lib/handlebars/compiler/printer.js
index b549d61..ad276f1 100644
--- a/lib/handlebars/compiler/printer.js
+++ b/lib/handlebars/compiler/printer.js
@@ -127,7 +127,7 @@ PrintVisitor.prototype.BooleanLiteral = function(bool) {
PrintVisitor.prototype.Hash = function(hash) {
var pairs = hash.pairs;
- var joinedPairs = [], left, right;
+ var joinedPairs = [];
for (var i=0, l=pairs.length; i<l; i++) {
joinedPairs.push(this.accept(pairs[i]));
diff --git a/lib/handlebars/compiler/visitor.js b/lib/handlebars/compiler/visitor.js
index c0cfab6..c2480ad 100644
--- a/lib/handlebars/compiler/visitor.js
+++ b/lib/handlebars/compiler/visitor.js
@@ -1,3 +1,4 @@
+/*jshint unused: false */
function Visitor() {}
Visitor.prototype = {