Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Follow up on negative predicate return value cleanup
 * Discovered some more on eswiki:Lenguas_bereberes

 * Continues from 724749a

Change-Id: I1f1639fc7d6a00048f60cbaeb98a4694412e509b
  • Loading branch information
arlolra committed May 6, 2014
1 parent a56039a commit 725aadf
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/pegTokenizer.pegjs.txt
Expand Up @@ -63,13 +63,12 @@
// Change in assumption from a shallow array to a nested array.
if (res === null) { res = e.slice(0, i); }
internal_flatten(v, res);
} else if (v) {
} else if ( v !== null && v !== undefined ) {
if (res !== null) {
res.push(v);
}
} else {
//console.error('falsy', v, e);
if (res === null) { res = e.slice(0, i); }
options.env.log("fatal", "falsy", e);
}
}

Expand Down Expand Up @@ -2521,31 +2520,31 @@ attribute_preprocessor_text_single_line
= r:( t:[^{}&'<|!]+ { return t.join(''); }
/ !inline_breaks r:(
directive
/ ![\r\n] [{}&<] ) { return r; }
/ ![\r\n] q:[{}&<] { return q; } ) { return r; }
)* {
return flatten_string ( r );
}
attribute_preprocessor_text_single_line_broken
= r:( t:[^{}&'<>|!]+ { return t.join(''); }
/ !inline_breaks r:(
directive
/ ![\r\n] [{}&<] ) { return r; }
/ ![\r\n] q:[{}&<] { return q; } ) { return r; }
)* {
return flatten_string ( r );
}
attribute_preprocessor_text_double_line
= r:( t:[^{}&"<|!]+ { return t.join(''); }
/ !inline_breaks r:(
directive
/ ![\r\n] [{}&<] ) { return r; }
/ ![\r\n] q:[{}&<] { return q; } ) { return r; }
)* {
return flatten_string ( r );
}
attribute_preprocessor_text_double_line_broken
= r:( t:[^{}&"<>|!]+ { return t.join(''); }
/ !inline_breaks r:(
directive
/ ![\r\n] [{}&<] ) { return r; }
/ ![\r\n] q:[{}&<] { return q; } ) { return r; }
)* {
return flatten_string ( r );
}
Expand Down

0 comments on commit 725aadf

Please sign in to comment.