From ec2f2d818c99da7ee994ae307d7911ff2c4e36b8 Mon Sep 17 00:00:00 2001 From: Doug Martin Date: Wed, 25 Feb 2015 00:54:40 -0600 Subject: [PATCH] v0.4.0 * Fix for issue #122 referencing defined class within another defined class * Also fixes accessing scoped functions within a defined class. * Fix for issue #119 window was removed from the nools.js file now it is called in the current scope of `this`. * Allow session.halt even for `match()` #143 - @raymondfeng * Now if you call `halt()` even if you did not call `matchUntilHalt()` * Now you can use a function as a constraint (Only applies to rules defined programatically) #142 - @raymondfeng * You can now define types using scope [#142](https://github.com/C2FO/nools/pull/142) - @raymondfeng * Fix for issue, is the dsl you do not have to escape `\` characters #123 --- browser/nools.js | 2 +- docs/History.html | 15 + docs/examples/browser/conways_2d.html | 1 - docs/index.html | 14 +- docs/nools.js | 20 +- examples/browser/conways_2d.html | 1 - history.md | 12 + lib/compile/common.js | 34 +- lib/compile/index.js | 6 +- lib/compile/transpile.js | 4 +- lib/constraint.js | 42 +- lib/constraintMatcher.js | 4 +- lib/flow.js | 8 +- lib/rule.js | 112 +- nools.js | 3285 +---------------- nools.min.js | 20 +- package.json | 2 +- readme.md | 11 +- test/flow.compiled.test.js | 68 +- test/flow.dsl.test.js | 52 +- test/issues.test.js | 14 + test/rules/comments-compiled.js | 2 +- test/rules/defined-compiled.js | 1 + test/rules/defined.nools | 26 + test/rules/provided-scope-compiled.js | 2 +- test/rules/scope-compiled.js | 2 +- test/rules/simple-compiled.js | 2 +- .../rules/simple-external-defined-compiled.js | 2 +- test/rules/simple.nools | 2 +- 29 files changed, 493 insertions(+), 3273 deletions(-) create mode 100644 test/rules/defined-compiled.js create mode 100644 test/rules/defined.nools diff --git a/browser/nools.js b/browser/nools.js index 110052e..d608f1f 100644 --- a/browser/nools.js +++ b/browser/nools.js @@ -20,4 +20,4 @@ } else { this.nools = nools; } -}).call(window); +}).call(typeof window !== "undefined" ? window : this); diff --git a/docs/History.html b/docs/History.html index a791717..3c3d693 100644 --- a/docs/History.html +++ b/docs/History.html @@ -178,6 +178,21 @@ +

0.4.0

+

0.3.0