MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / __parse_tzdata

Function __parse_tzdata

system/lib/libcxx/src/experimental/tzdb.cpp:599–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599static void __parse_tzdata(tzdb& __db, __tz::__rules_storage_type& __rules, istream& __input) {
600 while (true) {
601 int __c = std::tolower(__input.get());
602
603 switch (__c) {
604 case istream::traits_type::eof():
605 return;
606
607 case ' ':
608 case '\t':
609 case '\n':
610 break;
611
612 case '#':
613 chrono::__skip_line(__input);
614 break;
615
616 case 'r':
617 chrono::__skip(__input, "ule");
618 chrono::__parse_rule(__db, __rules, __input);
619 break;
620
621 case 'z':
622 chrono::__skip(__input, "one");
623 chrono::__parse_zone(__db, __rules, __input);
624 break;
625
626 case 'l':
627 chrono::__skip(__input, "ink");
628 chrono::__parse_link(__db, __input);
629 break;
630
631 default:
632 std::__throw_runtime_error("corrupt tzdb: unexpected input");
633 }
634 }
635}
636
637static void __parse_leap_seconds(vector<leap_second>& __leap_seconds, istream&& __input) {
638 // The file stores dates since 1 January 1900, 00:00:00, we want

Callers 1

__init_tzdbFunction · 0.85

Calls 8

__skip_lineFunction · 0.85
__skipFunction · 0.85
__parse_ruleFunction · 0.85
__parse_zoneFunction · 0.85
__parse_linkFunction · 0.85
__throw_runtime_errorFunction · 0.85
getMethod · 0.65
tolowerFunction · 0.50

Tested by

no test coverage detected