yog-script-analyze 0.1.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
//! `inside` — points within a patched method.

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

pub static WORD: Word = Word {
    text: "inside",
    doc: "Points within a patched method: `inside tick() { around call aiStep() { … } }`. \
          A point matching several places needs `first`, `last` or `where`.",
    reserved: false,
    roles: &[Role::PatchItem { parse }],
};

fn parse(p: &mut Parser) -> PResult<PatchItem> {
    p.bump();
    let method = p.method()?;
    Ok(PatchItem::Inside { method, points: p.points()? })
}