src/sys/dotnet/fanx/serial/Tokenizer.cs
/// <summary>
/// Parse a char literal token (as Long literal).
/// </summary>
Parse a char literal token (as Long literal).
Parse a char literal token ( as Long literal ) .
private int ch()
    {
      consume();
      char c;
      if (cur == '\\')
      {
        c = escape();
      }
      else
      {
        c = (char)cur;
        consume();
      }
      if (cur != '\'') throw err("Expecting ' close of char literal");
      consume();
      m_val = Long.valueOf(c);
      return Token.INT_LITERAL;
    }
private int ch ( ) { consume ( ) ; char c ; if ( cur == ' \\ ' ) { c = escape ( ) ; } else { c = ( char ) cur ; consume ( ) ; } if ( cur != ' \' ' ) throw err ( " " ) ; consume ( ) ; m_val = Long . valueOf ( c ) ; return Token . INT_LITERAL ; }
Parse a char literal token (as Long literal).
Parse a char literal token ( as Long literal ) .
// consume opening quote // if \ then process as escape // expecting ' quote