Function TokenIterator.readUntilType

Concatenate all the tokens until the first token of a certain type that will be ignored

string readUntilType (
  string type
);