Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  lib.rs

  Sprache: Rust
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


//! # Uniffi support for webidl syntax, typically from a .udl file, as described by weedle.
//!
//! This library is dedicated to parsing a string in a webidl syntax, as described by
//! weedle and with our own custom take on the attributes etc, pushing the boundaries
//! of that syntax to describe a uniffi `MetadataGroup`.
//!
//! The output of this module is consumed by uniffi_bindgen to generate stuff.

mod attributes;
mod collectors;
mod converters;
mod finder;
mod literal;
mod resolver;

use anyhow::Result;
use collectors::{InterfaceCollector, TypeCollector};
use uniffi_meta::Type;

/// The single entry-point to this module.
pub fn parse_udl(udl: &str, crate_name: &str) -> Result<uniffi_meta::MetadataGroup> {
    Ok(InterfaceCollector::from_webidl(udl, crate_name)?.into())
}

#[cfg(test)]
mod test {
    use super::*;

    #[test]
    fn test_group() {
        const UDL: &str = r#"
            namespace test{};
            dictionary Empty {};
        "#;
        let group = parse_udl(UDL, "crate_name").unwrap();
        assert_eq!(group.namespace.name, "test");
        assert_eq!(group.items.len(), 1);
        assert!(matches!(
            group.items.into_iter().next().unwrap(),
            uniffi_meta::Metadata::Record(r) if r.module_path == "crate_name" && r.name == "Empty" && r.fields.is_empty()
        ));
    }
}

Messung V0.5 in Prozent
C=59 H=92 G=76

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-06-18) ¤

*© 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