slang_solidity 1.3.2

A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling. Written in Rust and distributed in multiple languages.
Documentation
{# This needs to stay in sync with the wit-bindgen output #}
{%- if model.kinds.labels|length <= 256 %} #[repr(u8)] {% else %} #[repr(u16)] {% endif %}
#[derive(
    Debug,
    Eq,
    Hash,
    Ord,
    PartialEq,
    PartialOrd,
    serde::Serialize,
    strum_macros::AsRefStr,
    strum_macros::Display,
    strum_macros::EnumString,
    strum_macros::IntoStaticStr,
)]
#[strum(serialize_all = "snake_case")]
#[derive(Clone, Copy)]
/// Represents the different types of relationships between nodes in the syntax tree.
pub enum EdgeLabel {
    {# Built-in: #}

    {% for label in model.kinds.predefined_labels -%}
        /// Represents a child node with the label `{{ label | snake_case }}`.
        {{ label | pascal_case }},
    {%- endfor %}

    {# Generated: #}
    {% for label in model.kinds.labels -%}
        /// Represents a child node with the label `{{ label | snake_case }}`.
        {{ label | pascal_case }},
    {%- endfor -%}
}

impl crate::cst::EdgeLabelExtensions for EdgeLabel {}

impl Default for EdgeLabel {
    fn default() -> Self {
        Self::Root
    }
}