yog-script-analyze 0.4.0

Yog Script (.ys, .yns) analyzed: its lexer, parser and syntax tree, names resolved, the class index model — what the build and the editors read a source with.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
namespace System;

/// A value set once, by whoever comes first (Rust's `OnceCell`/`OnceLock`,
/// .NET's `LazyInitializer`); thread-safe.
[Intrinsic]
public readonly sealed class Once<T> {
    public Once() {}

    /// Sets it unless it's set: whether this did.
    public readonly bool TrySet(T value);
    /// Its value, made by `make` if it's not set yet (once, whoever asks).
    public readonly T GetOrInit(Func<T> make);
    /// Its value, `null` until it's set.
    public readonly T? Get();
    public bool IsSet { get; }
}