neo_decompiler/decompiler/
output_format.rs1#[cfg(feature = "cli")]
2use clap::ValueEnum;
3
4#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
6#[cfg_attr(feature = "cli", derive(ValueEnum))]
7pub enum OutputFormat {
8 Pseudocode,
10 HighLevel,
12 #[cfg_attr(feature = "cli", value(name = "csharp", alias = "c-sharp"))]
18 CSharp,
19 #[default]
21 All,
22}
23
24impl OutputFormat {
25 pub(super) fn wants_pseudocode(self) -> bool {
26 matches!(self, OutputFormat::Pseudocode | OutputFormat::All)
27 }
28
29 pub(super) fn wants_high_level(self) -> bool {
30 matches!(self, OutputFormat::HighLevel | OutputFormat::All)
31 }
32
33 pub(super) fn wants_csharp(self) -> bool {
34 matches!(self, OutputFormat::CSharp | OutputFormat::All)
35 }
36}