Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  data.rs

  Sprache: Rust
 

//! Data generated by scope analysis, and consumed only by emitter

use std::collections::HashMap;
use stencil::script::ScriptStencilIndex;

/// Data associated to a function.
#[derive(Debug)]
pub struct FunctionProperty {
    is_annex_b: bool,
}

impl FunctionProperty {
    fn is_annex_b_default() -> bool {
        false
    }

    pub fn new() -> Self {
        Self {
            is_annex_b: Self::is_annex_b_default(),
        }
    }

    pub fn mark_annex_b(&mut self) {
        self.is_annex_b = true;
    }

    pub fn is_annex_b(&self) -> bool {
        self.is_annex_b
    }
}

/// Map from function to associated data.
#[derive(Debug)]
pub struct FunctionDeclarationPropertyMap {
    /// This map is populated lazily, only for functions with non-default
    /// property.
    props: HashMap<ScriptStencilIndex, FunctionProperty>,
}

impl FunctionDeclarationPropertyMap {
    pub fn new() -> Self {
        Self {
            props: HashMap::new(),
        }
    }

    pub fn mark_annex_b(&mut self, index: ScriptStencilIndex) {
        if !self.props.contains_key(&index) {
            self.props.insert(index, FunctionProperty::new());
        }

        self.props
            .get_mut(&index)
            .expect("Should exist")
            .mark_annex_b();
    }

    pub fn is_annex_b(&self, index: ScriptStencilIndex) -> bool {
        if !self.props.contains_key(&index) {
            return FunctionProperty::is_annex_b_default();
        }

        self.props.get(&index).expect("Should exist").is_annex_b()
    }
}

Messung V0.5 in Prozent
C=66 H=89 G=78

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-19) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik