luaur-analyze-cli 0.1.1

Standalone Luau type-checker CLI (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::records::task_scheduler::TaskQueue;

/// `void workerFunction()` (`CLI/src/Analyze.cpp:381-385`):
///
/// ```cpp
/// while (std::function<void()> task = pop())
///     task();
/// ```
/// An empty `std::function` (modeled as `None`) is falsy and terminates the loop.
pub fn task_scheduler_worker_function(tasks: &TaskQueue) {
    while let Some(task) = crate::methods::task_scheduler_pop::task_scheduler_pop(tasks) {
        task();
    }
}