aconfig: move CodegenMode to codegen crate
This change moves CodegenMode to codegen crate. Bug: 311152507 Test: ateset aconfig.test Change-Id: I4f64cdbdc3d1b419412012560bfe03344b2b8faf
This commit is contained in:
@@ -19,6 +19,7 @@ pub mod java;
|
||||
pub mod rust;
|
||||
|
||||
use anyhow::{ensure, Result};
|
||||
use clap::ValueEnum;
|
||||
|
||||
pub fn is_valid_name_ident(s: &str) -> bool {
|
||||
// Identifiers must match [a-z][a-z0-9_]*, except consecutive underscores are not allowed
|
||||
@@ -52,6 +53,13 @@ pub fn create_device_config_ident(package: &str, flag_name: &str) -> Result<Stri
|
||||
Ok(format!("{}.{}", package, flag_name))
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, ValueEnum)]
|
||||
pub enum CodegenMode {
|
||||
Production,
|
||||
Test,
|
||||
Exported,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
Reference in New Issue
Block a user