revive_solc_json_interface/standard_json/input/language.rs
1//! The `solc --standard-json` input language.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// The `solc --standard-json` input language.
7#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Hash)]
8pub enum Language {
9 /// The Solidity language.
10 Solidity,
11 /// The Yul IR.
12 Yul,
13}
14
15impl std::fmt::Display for Language {
16 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17 match self {
18 Self::Solidity => write!(f, "Solidity"),
19 Self::Yul => write!(f, "Yul"),
20 }
21 }
22}