Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
7f3e7d58
authored
2013-11-03 09:11:14 -0800
by
David McClure
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
In KeypathParer.parse, iterate over the keypath string with 'in' instead of 'of'.
1 parent
19bf8b2a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
dist/rivets.js
dist/rivets.min.js
src/parsers.coffee
dist/rivets.js
View file @
7f3e7d5
...
...
@@ -637,14 +637,14 @@
function
KeypathParser
()
{}
KeypathParser
.
parse
=
function
(
keypath
,
interfaces
,
root
)
{
var
char
,
current
,
index
,
tokens
;
var
char
,
current
,
tokens
,
_i
,
_len
;
tokens
=
[];
current
=
{
"interface"
:
root
,
path
:
''
};
for
(
index
in
keypath
)
{
char
=
keypath
[
index
];
for
(
_i
=
0
,
_len
=
keypath
.
length
;
_i
<
_len
;
_i
++
)
{
char
=
keypath
[
_i
];
if
(
__indexOf
.
call
(
interfaces
,
char
)
>=
0
)
{
tokens
.
push
(
current
);
current
=
{
...
...
dist/rivets.min.js
View file @
7f3e7d5
This diff is collapsed.
Click to expand it.
src/parsers.coffee
View file @
7f3e7d5
...
...
@@ -8,7 +8,7 @@ class Rivets.KeypathParser
tokens
=
[]
current
=
{
interface
:
root
,
path
:
''
}
for
index
,
char
of
keypath
for
char
in
keypath
if
char
in
interfaces
tokens
.
push
current
current
=
{
interface
:
char
,
path
:
''
}
...
...
Please
register
or
sign in
to post a comment