openfoam/applications/test/OListStream
Mark Olesen 51cd7ceecb ENH: improvements for token methods
- direct check of punctuation.
  For example,

      while (!tok.isPunctuation(token::BEGIN_LIST)) ..

  instead of

  while (!(tok.isPunctuation() && tok.pToken() == token::BEGIN_LIST)) ..

  Using direct comparison (tok != token::BEGIN_LIST) can be fragile
  when comparing int values:

      int c = readChar(is);
      while (tok != c) ..  // Danger, uses LABEL comparison!

- direct check of word.
  For example,

      if (tok.isWord("uniform")) ..

  instead of

      if (tok.isWord() && tok.wordToken() == "uniform") ..

- make token lineNumber() a setter method

ENH: adjust internal compound method empty() -> moved()

- support named compound tokens

STYLE: setter method for stream indentation
2021-03-09 09:23:41 +01:00
..
Make ENH: cleanup and rationalize memory-backed streams 2017-10-26 12:09:47 +02:00
Test-OListStream.C ENH: improvements for token methods 2021-03-09 09:23:41 +01:00