mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
added path grammar docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1081699919
commit
e00aa5cdde
@ -1654,6 +1654,27 @@ module.makeList = function(elem, list){
|
|||||||
|
|
||||||
// This is similar to List(..) but will parse paths in keys...
|
// This is similar to List(..) but will parse paths in keys...
|
||||||
//
|
//
|
||||||
|
// Path grammar:
|
||||||
|
//
|
||||||
|
// PATH ::= [/]<dirs> - simple traversable path
|
||||||
|
// | [/]<dirs>/<item> - path with last item non-traversable
|
||||||
|
// | [/]<dirs>/* - path to lister
|
||||||
|
//
|
||||||
|
// <dirs> ::= <item>
|
||||||
|
// | <dirs>/<item>/
|
||||||
|
//
|
||||||
|
// <item> ::= <name> - explicit path element
|
||||||
|
// | <item>|<name> - multiple path elements (a-la simlink)
|
||||||
|
//
|
||||||
|
// <name> ::= [^\|\\\/]*
|
||||||
|
//
|
||||||
|
// NOTE: <dirs> always ends with '/' or '\' and produces a set of
|
||||||
|
// traversable items.
|
||||||
|
// NOTE: the last item is non-traversable iff:
|
||||||
|
// - it does not end with '/' or '\'
|
||||||
|
// - there is no other path defined where it is traversable
|
||||||
|
//
|
||||||
|
//
|
||||||
// Format:
|
// Format:
|
||||||
// {
|
// {
|
||||||
// // basic 'file' path...
|
// // basic 'file' path...
|
||||||
@ -1740,6 +1761,8 @@ PathListPrototype.options = {
|
|||||||
// A - matches A exactly
|
// A - matches A exactly
|
||||||
// A|B - matches either A or B
|
// A|B - matches either A or B
|
||||||
var match = function(a, path){
|
var match = function(a, path){
|
||||||
|
// NOTE: might be good to make this recursive when expanding
|
||||||
|
// pattern support...
|
||||||
return a
|
return a
|
||||||
.split('|')
|
.split('|')
|
||||||
.filter(function(e){
|
.filter(function(e){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user