yog-script-analyze 0.2.2

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
//! `priority` — the order of patches on one point.

use crate::ast::PatchItem;
use crate::parser::{PResult, Parser};
use crate::words::{Role, Word};

pub static WORD: Word = Word {
    text: "priority",
    doc: "Where this patch stands among several on one point: `priority 100;` (higher wraps outer).",
    reserved: false,
    roles: &[Role::PatchItem { parse }],
};

fn parse(p: &mut Parser) -> PResult<PatchItem> {
    let at = p.bump().span;
    let value = p.int("a priority")?;
    p.end()?;
    Ok(PatchItem::Priority(value, at.to(p.prev())))
}