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 made the first time it's asked for, then kept: .NET's `Lazy<T>`
/// — a `Once<T>` and what makes its value (made once, whoever asks).
public readonly class Lazy<T> {
    private readonly Func<T> _make;
    private readonly Once<T> _value = new Once<T>();

    public Lazy(Func<T> valueFactory) {
        _make = valueFactory;
    }

    /// The value: made by the factory the first time.
    public T Value => _value.GetOrInit(_make);
    public bool IsValueCreated => _value.IsSet;
}