fn identifier_to_token(identifier: String) -> Token {
    match identifier.as_str() {
        "package" => Token::new(TokenKind::Package, None),
        "service" => Token::new(TokenKind::Service, None),
        "rpc" => Token::new(TokenKind::Rpc, None),
        "returns" => Token::new(TokenKind::Returns, None),
        "enum" => Token::new(TokenKind::Enum, None),
        _ => Token::new(TokenKind::Identifier, Some(identifier)),
    }
}
/// Convert identifier into corresponding token.
Convert identifier into corresponding token.
Convert identifier into corresponding token .
fn identifier_to_token(identifier: String) -> Token {
    match identifier.as_str() {
        "package" => Token::new(TokenKind::Package, None),
        "service" => Token::new(TokenKind::Service, None),
        "rpc" => Token::new(TokenKind::Rpc, None),
        "returns" => Token::new(TokenKind::Returns, None),
        "enum" => Token::new(TokenKind::Enum, None),
        _ => Token::new(TokenKind::Identifier, Some(identifier)),
    }
}
fn identifier_to_token ( identifier : String ) -> Token { match identifier . as_str ( ) { " " => Token :: new ( TokenKind :: Package , None ) , " " => Token :: new ( TokenKind :: Service , None ) , " " => Token :: new ( TokenKind :: Rpc , None ) , " " => Token :: new ( TokenKind :: Returns , None ) , " " => Token :: new ( TokenKind :: Enum , None ) , _ => Token :: new ( TokenKind :: Identifier , Some ( identifier ) ) , } }
Convert identifier into corresponding token.
Convert identifier into corresponding token .
identifier
String
identifier
String