Files
regorus/src/languages/azure_policy/compiler/count.rs
T
Anand Krishnamoorthi f727096a1d feat(azure-policy): add compiler skeleton with core types and stubs (#674)
Add the compiler module structure with:
- core.rs: Compiler struct, CountBinding, new(), compile() pipeline,
  register allocation, span/emit helpers
- mod.rs: module declarations, public entry points
  (compile_policy_rule, compile_policy_definition, etc.)
- utils.rs: pure helper functions (path splitting, JSON conversion)
- Stub files for conditions, expressions, fields, template dispatch,
  count, effects, and metadata — real implementations follow in
  subsequent commits.
2026-04-20 15:29:26 -05:00

30 lines
737 B
Rust

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(dead_code)]
//! `count` / `count.where` loop compilation.
//!
//! Stub — real implementation added in a later commit.
use anyhow::{bail, Result};
use crate::languages::azure_policy::ast::{Condition, CountNode};
use super::core::Compiler;
impl Compiler {
pub(super) fn compile_count(&mut self, _count_node: &CountNode) -> Result<u8> {
let _ = self;
bail!("count compilation not yet implemented")
}
pub(super) const fn try_compile_count_as_any(
&mut self,
_count_node: &CountNode,
_condition: &Condition,
) -> Result<Option<u8>> {
_ = self.register_counter;
Ok(None)
}
}