Skip to content

Commit

Permalink
Update algo description
Browse files Browse the repository at this point in the history
  • Loading branch information
grncdr authored and James Halliday committed Oct 18, 2013
1 parent c7ca9a2 commit e1442cf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,13 @@ function parse (s, env) {
//
// 1. inside single quotes, all characters are printed literally.
// 2. inside double quotes, all characters are printed literally
// except variables prefixed by '$' and double quotes prefixed by
// a backslash.
// 3. outside of any quotes, backslashes are not printed unless they
// are escaped.
// except variables prefixed by '$' and backslashes followed by
// either a double quote or another backslash.
// 3. outside of any quotes, backslashes are treated as escape
// characters and not printed (unless they are themselves escaped)
// 4. quote context can switch mid-token if there is no whitespace
// between the two quote contexts (e.g. all'one'"token" parses as
// "allonetoken")

var SQ = "'";
var DQ = '"';
var BS = '\\';
Expand Down

0 comments on commit e1442cf

Please sign in to comment.