(re)
| 1165 | // If re matches at current position in the subject, advance |
| 1166 | // position in subject and return the match; otherwise return null. |
| 1167 | var match = function(re) { |
| 1168 | var m = re.exec(this.subject.slice(this.pos)); |
| 1169 | if (m === null) { |
| 1170 | return null; |
| 1171 | } else { |
| 1172 | this.pos += m.index + m[0].length; |
| 1173 | return m[0]; |
| 1174 | } |
| 1175 | }; |
| 1176 | |
| 1177 | // Returns the code for the character at the current subject position, or -1 |
| 1178 | // there are no more characters. |