Comparing version 0.1.9 to 0.2.0
@@ -65,2 +65,7 @@ var ometajs_ = require("ometajs"); | ||
KrasotaJSIdentity.prototype["bool"] = function $bool() { | ||
var b; | ||
return this._skip() && (b = this._getIntermediate(), true) && this._exec([ "bool", n ]); | ||
}; | ||
KrasotaJSIdentity.prototype["number"] = function $number() { | ||
@@ -67,0 +72,0 @@ var n; |
@@ -150,2 +150,7 @@ var ometajs_ = require("ometajs"); | ||
KrasotaJSParser.prototype["isNumber"] = function $isNumber() { | ||
var x; | ||
return this._skip() && (x = this._getIntermediate(), true) && (x === "Infinity" || x === "NaN"); | ||
}; | ||
KrasotaJSParser.prototype["isKeyword"] = function $isKeyword() { | ||
@@ -160,2 +165,4 @@ var x; | ||
return this._rule("isKeyword", false, [ n ], null, this["isKeyword"]); | ||
}, true) && !this._atomic(function() { | ||
return this._rule("isNumber", false, [ n ], null, this["isNumber"]); | ||
}, true) && this._exec([ "name", n ]); | ||
@@ -169,2 +176,7 @@ }; | ||
KrasotaJSParser.prototype["bool"] = function $bool() { | ||
var b; | ||
return (this._seq("true") || this._seq("false")) && (b = this._getIntermediate(), true) && this._exec([ "bool", b ]); | ||
}; | ||
KrasotaJSParser.prototype["hexDigit"] = function $hexDigit() { | ||
@@ -207,2 +219,5 @@ var x, v; | ||
}, true) && (f = this._getIntermediate(), true) && this._exec([ "number", f ]); | ||
}) || this._atomic(function() { | ||
var s; | ||
return (this._seq("Infinity") || this._seq("NaN")) && (s = this._getIntermediate(), true) && this._exec([ "number", s ]); | ||
}); | ||
@@ -529,3 +544,3 @@ }; | ||
var sc1, e, sc2; | ||
return this._rule("sc", false, [], null, this["sc"]) && (sc1 = this._getIntermediate(), true) && this._rule("expr", false, [], null, this["expr"]) && (e = this._getIntermediate(), true) && this._rule("sc", false, [], null, this["sc"]) && (sc2 = this._getIntermediate(), true) && this._exec([ "arg", sc1, e, sc2 ]); | ||
return this._rule("sc", false, [], null, this["sc"]) && (sc1 = this._getIntermediate(), true) && this._rule("asgnExpr", false, [], null, this["asgnExpr"]) && (e = this._getIntermediate(), true) && this._rule("sc", false, [], null, this["sc"]) && (sc2 = this._getIntermediate(), true) && this._exec([ "arg", sc1, e, sc2 ]); | ||
}; | ||
@@ -573,2 +588,6 @@ | ||
}) || this._atomic(function() { | ||
return this._rule("keyword", false, [ "null" ], null, this["keyword"]); | ||
}) || this._atomic(function() { | ||
return this._rule("bool", false, [], null, this["bool"]); | ||
}) || this._atomic(function() { | ||
return this._rule("name", false, [], null, this["name"]); | ||
@@ -984,2 +1003,2 @@ }) || this._atomic(function() { | ||
}; | ||
}([ "break", "case", "catch", "continue", "default", "delete", "do", "else", "finally", "for", "function", "if", "in", "instanceof", "new", "return", "switch", "this", "throw", "try", "typeof", "var", "void", "while", "with" ]); | ||
}([ "break", "case", "catch", "continue", "default", "delete", "do", "else", "finally", "for", "function", "if", "in", "instanceof", "new", "null", "return", "switch", "this", "throw", "try", "typeof", "var", "void", "while", "with" ]); |
@@ -56,2 +56,7 @@ var ometajs_ = require("ometajs"); | ||
KrasotaJSSerializer.prototype["bool"] = function $bool() { | ||
var b; | ||
return this._skip() && (b = this._getIntermediate(), true); | ||
}; | ||
KrasotaJSSerializer.prototype["number"] = function $number() { | ||
@@ -58,0 +63,0 @@ var n; |
{ | ||
"name": "krasota", | ||
"description": "Syntactic transformations of JavaScript code, with taking care of whitespaces and comments.", | ||
"version": "0.1.9", | ||
"version": "0.2.0", | ||
"homepage": "http://github.com/veged/krasota.js", | ||
@@ -6,0 +6,0 @@ "author": "Sergey Berezhnoy <veged@ya.ru> (http://github.com/veged)", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
216080
3607