diff --git a/diff.js b/diff.js index 50936dc..e435c8e 100644 --- a/diff.js +++ b/diff.js @@ -29,6 +29,7 @@ var MIN_TEXT_LENGTH = 100 // - revise architecture... // - merge Types and Diff // - cmp(..) / diff(..) / patch(..) to use Diff(..) +// // - revise name -- this contains two parts: // 1. diff / patch and friends // 2. cmp and patterns @@ -36,29 +37,19 @@ var MIN_TEXT_LENGTH = 100 // ig-diff // cdiff // pattern diff -// // we need the name to be short and descriptive, possible // candidates: // - objdiff / object-diff // - diffcmp / diff-cmp // - compare +// // - revise docs... // ...should be simpler to enter, maybe example-oriented intro +// // - diff visualization -- for example see: // https://www.npmjs.com/package/jsondiffpatch -// - experiment with pattern contexts... -// a context is essentially a namespace for a pattern within a -// specific use instance. -// this would enable us to create a settable/linkable named -// pattern that would: -// - until first successful match use pattern to compare -// - set on first successful match -// - subsequent matches would compare to the set value // -// NAMED([, pattern]) -// -// this would also require a means to pass the context to -// nested patterns and to access it... +// - diff compatibility checking... // // // @@ -71,7 +62,6 @@ var MIN_TEXT_LENGTH = 100 // zip(func, array, array, ...) // -> [func(i, [item, item, ...]), ...] // -// XXX revise -- is this too complicated??? var zip = function(func, ...arrays){ var i = arrays[0] instanceof Array ? 0 : arrays.shift() if(func instanceof Array){ @@ -2543,5 +2533,6 @@ function(pattern, obj){ + /********************************************************************** * vim:set ts=4 sw=4 : */ return module }) diff --git a/format.js b/format.js index fb7456d..109cca8 100644 --- a/format.js +++ b/format.js @@ -27,8 +27,7 @@ var { // // XXX need better mismatch checking -- ideally stating the exact spot // where we did not match and the path of fails it created... -// XXX idea: would be nice to be able to use patterns to extract values -// from structures (parsing)... +// // //--------------------------------------------------------------------- // Flat diff... @@ -153,8 +152,6 @@ module.DIFF_OBJECT = AND( AT('no_length', OR(BOOL, NULL)), AT('cmp', OR(FUNCTION, NULL)) )), AT('placeholders', AND( - // XXX would be nice to store these and to use them to test - // deeper stuff (i.e. VALUE)... AT('NONE', VAR('NONE', ANY)), AT('EMPTY',