vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::ir::validate::{err, Binding, ValidationError};
use rustc_hash::FxHashMap;

#[inline]
pub fn check_local(
    name: &str,
    scope: &FxHashMap<String, Binding>,
    errors: &mut Vec<ValidationError>,
) {
    if scope.contains_key(name) {
        errors.push(err(format!(
            "V008: duplicate local binding `{name}`. Fix: choose a unique local name; shadowing is not allowed."
        )));
    }
}