skipComment

Undocumented in source. Be warned that the author may not have intended to support it.
@safe @nogc pure
bool
skipComment

Examples

Test single-line skipping

import mir.deser.text.tokenizer : tokenizeString, testRead;
auto t = tokenizeString("/comment\nok");
assert(t.skipComment());
t.testRead('o');
t.testRead('k');
t.testRead(0);

Test block skipping

import mir.deser.text.tokenizer : tokenizeString, testRead;
auto t = tokenizeString("*comm\nent*/ok");
assert(t.skipComment());
t.testRead('o');
t.testRead('k');
t.testRead(0);

Test false-alarm skipping

import mir.deser.text.tokenizer : tokenizeString, testRead;
auto t = tokenizeString(" 0)");
assert(!t.skipComment());
t.testRead(' ');
t.testRead('0');
t.testRead(')');
t.testRead(0);

Meta