(scope, str, pos, close)
| 208 | } |
| 209 | |
| 210 | function parseLabelList(scope, str, pos, close) { |
| 211 | var labels = [], types = [], madeUp = false; |
| 212 | for (var first = true; ; first = false) { |
| 213 | pos = skipSpace(str, pos); |
| 214 | if (first && str.charAt(pos) == close) break; |
| 215 | var colon = str.indexOf(":", pos); |
| 216 | if (colon < 0) return null; |
| 217 | var label = str.slice(pos, colon); |
| 218 | if (!isIdentifier(label)) return null; |
| 219 | labels.push(label); |
| 220 | pos = colon + 1; |
| 221 | var type = parseType(scope, str, pos); |
| 222 | if (!type) return null; |
| 223 | pos = type.end; |
| 224 | madeUp = madeUp || type.madeUp; |
| 225 | types.push(type.type); |
| 226 | pos = skipSpace(str, pos); |
| 227 | var next = str.charAt(pos); |
| 228 | ++pos; |
| 229 | if (next == close) break; |
| 230 | if (next != ",") return null; |
| 231 | } |
| 232 | return {labels: labels, types: types, end: pos, madeUp: madeUp}; |
| 233 | } |
| 234 | |
| 235 | function parseTypeAtom(scope, str, pos) { |
| 236 | var result = parseTypeInner(scope, str, pos); |
no test coverage detected
searching dependent graphs…