src/sys/dotnet/fanx/serial/Tokenizer.cs
/// <summary>
/// Parse a uri literal token.
/// </summary>
Parse a uri literal token.
Parse a uri literal token .
private int uri()
    {
      consume();
      StringBuilder s = new StringBuilder();
      while (true)
      {
        if (cur < 0) throw err("Unexpected end of uri");
        if (cur == '\\')
        {
          s.Append((char)escape());
        }
        else
        {
          if (cur == '`') { consume(); break; }
          s.Append((char)cur);
          consume();
        }
      }
      m_val = Uri.fromStr(s.ToString());
      return Token.URI_LITERAL;
    }
private int uri ( ) { consume ( ) ; StringBuilder s = new StringBuilder ( ) ; while ( true ) { if ( cur < 0 ) throw err ( " " ) ; if ( cur == ' \\ ' ) { s . Append ( ( char ) escape ( ) ) ; } else { if ( cur == ' ' ) { consume ( ) ; break ; } s . Append ( ( char ) cur ) ; consume ( ) ; } } m_val = Uri . fromStr ( s . ToString ( ) ) ; return Token . URI_LITERAL ; }
Parse a uri literal token.
Parse a uri literal token .
// consume opening tick // store starting position // loop until we find end of string