| 130 | static int yyInPos; |
| 131 | |
| 132 | static uint getChar() |
| 133 | { |
| 134 | forever { |
| 135 | if (yyInPos >= yyInStr.size()) |
| 136 | return EOF; |
| 137 | uint c = yyInStr[yyInPos++].unicode(); |
| 138 | if (c == '\\' && yyInPos < yyInStr.size()) { |
| 139 | if (yyInStr[yyInPos].unicode() == '\n') { |
| 140 | ++yyCurLineNo; |
| 141 | ++yyInPos; |
| 142 | continue; |
| 143 | } |
| 144 | if (yyInStr[yyInPos].unicode() == '\r') { |
| 145 | ++yyCurLineNo; |
| 146 | ++yyInPos; |
| 147 | if (yyInPos < yyInStr.size() && yyInStr[yyInPos].unicode() == '\n') |
| 148 | ++yyInPos; |
| 149 | continue; |
| 150 | } |
| 151 | } |
| 152 | if (c == '\r') { |
| 153 | if (yyInPos < yyInStr.size() && yyInStr[yyInPos].unicode() == '\n') |
| 154 | ++yyInPos; |
| 155 | c = '\n'; |
| 156 | ++yyCurLineNo; |
| 157 | } else if (c == '\n') { |
| 158 | ++yyCurLineNo; |
| 159 | } |
| 160 | return c; |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | static Token getToken() |
no test coverage detected