(type, value, is_comment)
| 300 | }; |
| 301 | |
| 302 | function token(type, value, is_comment) { |
| 303 | S.regex_allowed = ((type == "operator" && !HOP(UNARY_POSTFIX, value)) || |
| 304 | (type == "keyword" && HOP(KEYWORDS_BEFORE_EXPRESSION, value)) || |
| 305 | (type == "punc" && HOP(PUNC_BEFORE_EXPRESSION, value))); |
| 306 | var ret = { |
| 307 | type : type, |
| 308 | value : value, |
| 309 | line : S.tokline, |
| 310 | col : S.tokcol, |
| 311 | pos : S.tokpos, |
| 312 | nlb : S.newline_before |
| 313 | }; |
| 314 | if (!is_comment) { |
| 315 | ret.comments_before = S.comments_before; |
| 316 | S.comments_before = []; |
| 317 | } |
| 318 | S.newline_before = false; |
| 319 | return ret; |
| 320 | }; |
| 321 | |
| 322 | function skip_whitespace() { |
| 323 | while (HOP(WHITESPACE_CHARS, peek())) |
no test coverage detected
searching dependent graphs…