(match, shortNames, longNames)
| 1177 | }; |
| 1178 | // Extract a name from the string value and convert to an index |
| 1179 | var getName = function(match, shortNames, longNames) { |
| 1180 | var names = (lookAhead(match) ? longNames : shortNames); |
| 1181 | for (var i = 0; i < names.length; i++) { |
| 1182 | if (value.substr(iValue, names[i].length) == names[i]) { |
| 1183 | iValue += names[i].length; |
| 1184 | return i + 1; |
| 1185 | } |
| 1186 | } |
| 1187 | throw 'Unknown name at position ' + iValue; |
| 1188 | }; |
| 1189 | // Confirm that a literal character matches the string value |
| 1190 | var checkLiteral = function() { |
| 1191 | if (value.charAt(iValue) != format.charAt(iFormat)) |
no test coverage detected