protected override void StartToken(char nextCh) { if (_newlinePending) { Newline(); } if (LesLexer.IsIdContChar(_lastCh) && LesLexer.IsIdContChar(nextCh)) { _out.Write(' '); } else if (LesLexer.IsOpContChar(_lastCh) && LesLexer.IsOpContChar(nextCh)) { _out.Write(' '); } }
protected override void StartToken(char nextCh) { if (_newlinePending) { Newline(); } if (LesLexer.IsIdContChar(_lastCh) && LesLexer.IsIdContChar(nextCh)) { _out.Write(' '); } else if (LesLexer.IsOpContChar(_lastCh) && LesLexer.IsOpContChar(nextCh)) { _out.Write(' '); } else if (_lastCh == '-' && (nextCh >= '0' && nextCh <= '9')) // - 2 is different from -2 (-(2) vs integer literal) { _out.Write(' '); } }