Esempio n. 1
0
 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(' ');
     }
 }
Esempio n. 2
0
 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(' ');
     }
 }