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 CSharp,
14 #[default]
16 All,
17}
18
19impl OutputFormat {
20 pub(super) fn wants_pseudocode(self) -> bool {
21 matches!(self, OutputFormat::Pseudocode | OutputFormat::All)
22 }
23
24 pub(super) fn wants_high_level(self) -> bool {
25 matches!(self, OutputFormat::HighLevel | OutputFormat::All)
26 }
27
28 pub(super) fn wants_csharp(self) -> bool {
29 matches!(self, OutputFormat::CSharp | OutputFormat::All)
30 }
31}