Comparing version 1.0.1 to 1.0.2
10
ample.js
@@ -77,3 +77,3 @@ var Lang = require('lang-js'), | ||
ParenthesesOpenToken.tokenPrecedence = 1; | ||
ParenthesesOpenToken.prototype.parsePrecedence = 5; | ||
ParenthesesOpenToken.prototype.parsePrecedence = 2; | ||
ParenthesesOpenToken.prototype.name = 'ParenthesesOpenToken' | ||
@@ -85,3 +85,3 @@ ParenthesesOpenToken.tokenise = function(substring) { | ||
} | ||
ParenthesesOpenToken.prototype.parse = function(tokens, position){ | ||
ParenthesesOpenToken.prototype.parse = function(tokens, position, parse){ | ||
this.childTokens = []; | ||
@@ -101,2 +101,4 @@ | ||
this.childTokens = parse(this.childTokens); | ||
// Remove close token | ||
@@ -276,3 +278,3 @@ tokens.splice(nextIndex, 1)[0] | ||
OpperatorToken.tokenPrecedence = 2; | ||
OpperatorToken.prototype.parsePrecedence = 4; | ||
OpperatorToken.prototype.parsePrecedence = 3; | ||
OpperatorToken.prototype.name = 'OpperatorToken'; | ||
@@ -377,3 +379,3 @@ OpperatorToken.prototype.parse = function(tokens, position){ | ||
IdentifierToken.tokenPrecedence = 3; | ||
IdentifierToken.prototype.parsePrecedence = 3; | ||
IdentifierToken.prototype.parsePrecedence = 2; | ||
IdentifierToken.prototype.name = 'IdentifierToken'; | ||
@@ -380,0 +382,0 @@ IdentifierToken.tokenise = function(substring){ |
{ | ||
"name": "ample", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "ample.js", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -54,2 +54,10 @@ var test = require('grape'), | ||
}); | ||
test("var a = 5; floor(a / 2) / 2", function (t) { | ||
t.plan(1); | ||
t.equal(ample.evaluate(t.name), 1); | ||
}); | ||
test("var a = 5; 2 * floor(a / 2)", function (t) { | ||
t.plan(1); | ||
t.equal(ample.evaluate(t.name), 4); | ||
}); | ||
test("1(1)", function (t) { | ||
@@ -56,0 +64,0 @@ t.plan(1); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17195
493