Debian Codegraph @

yo/coroutines/demo/fsa_awaiter/start/costart.cc

raw symbols SCIP
1 #include "start.ih"
2
3 Start coStart()
4 {
5 char ch;
6 while (cin.get(ch))
7 {
8 if (isalpha(ch))
9 {
10 cout << "at `" << ch << "' from start to letter\n";
11 co_await Awaiter{ g_letter.handle() };
12 }
13 else
14 if (isdigit(ch))
15 {
16 cout << "at `" << ch << "' from start to digit\n";
17 co_await Awaiter{ g_digit.handle() };
18 }
19 else
20 cout << "at char #" << static_cast<int>(ch) <<
21 ": remain in start\n";
22 }
23 co_await Awaiter{ g_done.handle() };
24 }
25 //=