parse_Max_Forwards method
dynamic
parse_Max_Forwards()
Implementation
dynamic parse_Max_Forwards() {
var $$;
switch (_ch >= 0 && _ch <= 57
? 0
: _ch == -1
? 2
: 1) {
case 0:
var startPos0 = _startPos;
_startPos = _cursor;
var testing0;
for (var first = true, reps;;) {
$$ = _parse_DIGIT();
if (success) {
if (first) {
first = false;
reps = [$$];
testing0 = _testing;
} else {
reps.add($$);
}
_testing = _cursor;
} else {
success = !first;
if (success) {
_testing = testing0;
$$ = reps;
} else
$$ = null;
break;
}
}
if (success) {
final $1 = $$;
final $start = startPos0;
var pos0 = _startPos;
$$ = ((offset, forwards) {
///CODE_START
return parseInt(forwards.join(''));
///CODE_END
})($start, $1);
}
_startPos = startPos0;
break;
case 1:
case 2:
$$ = null;
success = false;
break;
}
if (!success && _cursor > _testing) {
_failure(_expect1);
}
return $$;
}