pub struct Program {
pub includes: Vec<Include>,
pub words: Vec<WordDef>,
}Fields§
§includes: Vec<Include>§words: Vec<WordDef>Implementations§
Source§impl Program
impl Program
pub fn new() -> Self
pub fn find_word(&self, name: &str) -> Option<&WordDef>
Sourcepub fn validate_word_calls(&self) -> Result<(), String>
pub fn validate_word_calls(&self) -> Result<(), String>
Validate that all word calls reference either a defined word or a built-in
Sourcepub fn validate_word_calls_with_externals(
&self,
external_words: &[&str],
) -> Result<(), String>
pub fn validate_word_calls_with_externals( &self, external_words: &[&str], ) -> Result<(), String>
Validate that all word calls reference a defined word, built-in, or external word.
The external_words parameter should contain names of words available from
external sources (e.g., included modules) that should be considered valid.
Trait Implementations§
impl StructuralPartialEq for Program
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more