Skip to content

Commit

Permalink
Fix jshint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdsteele committed Feb 22, 2015
1 parent 3dc02c6 commit d05e647
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gulpfile.js
Expand Up @@ -10,7 +10,7 @@ gulp.task('clean', function() {
});

gulp.task('lint', function() {
return gulp.src(['main.js', 'Transpiler.js', 'test/**.js'])
return gulp.src(['bin/**.js', 'lib/**.js', 'test/**.js'])
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
Expand Down
16 changes: 8 additions & 8 deletions lib/ast.js
Expand Up @@ -25,7 +25,7 @@ var AstNode = function(line, column) {
AstNode.prototype._sn = function(indent, fileName, chunk) {
return new SourceNode(this.line, this.column, fileName, '')
.add(indentNode(indent))
.add(chunk)
.add(chunk);
};

//Keywords/Expressions
Expand Down Expand Up @@ -71,7 +71,7 @@ AssignementExpression.prototype.compile = function(indent, fileName) {
.add(' = (');

if (this.operations && this.operations.length > 0) {
var opsNodes = [this.initialValue.compile(indent, fileName)]
var opsNodes = [this.initialValue.compile(indent, fileName)];
this.operations.forEach(function (operation) {
opsNodes.splice(0, 0, '(');
opsNodes.push(operation.compile(indent, fileName));
Expand Down Expand Up @@ -159,10 +159,10 @@ WhileExpression.prototype.compile = function(indent, fileName) {
};


function MethodDeclarationExpression (line, column, name, arguments, innerStatements, endLine, endColumn) {
function MethodDeclarationExpression (line, column, name, args, innerStatements, endLine, endColumn) {
AstNode.call(this, line, column);
this.name = name;
this.arguments = arguments;
this.args = args;
this.innerStatements = innerStatements;
this.endLine = endLine;
this.endColumn = endColumn;
Expand All @@ -175,7 +175,7 @@ MethodDeclarationExpression.prototype.compile = function(indent, fileName) {
.add(' (');


this.arguments.forEach(function(argument, i, self) {
this.args.forEach(function(argument, i, self) {
node.add(argument.compile(0, fileName));
if (i != self.length - 1) {
node.add(', ');
Expand All @@ -190,18 +190,18 @@ MethodDeclarationExpression.prototype.compile = function(indent, fileName) {
.add(new SourceNode(this.endLine, this.endColumn, fileName, '}\n'));
};

function CallExpression (line, column, name, arguments) {
function CallExpression (line, column, name, args) {
AstNode.call(this, line, column);
this.name = name;
this.arguments = arguments;
this.args = args;
}
CallExpression.prototype = Object.create(AstNode.prototype);
CallExpression.prototype.compile = function(indent, fileName) {
var node = this._sn(indent, fileName, '')
.add(this.name.compile(indent, fileName))
.add('(');

this.arguments.forEach(function(argument, i, self) {
this.args.forEach(function(argument, i, self) {
node.add(argument.compile(indent, fileName));
if (i != self.length - 1) {
node.add(', ');
Expand Down

0 comments on commit d05e647

Please sign in to comment.