pub enum PrologItem {
Directive(PrologDirective),
Predicate(PrologPredicate),
Clause(PrologClause),
Dcg(DcgRule),
BlankLine,
SectionComment(String),
LineComment(String),
}Expand description
An item at the top level of a Prolog source file.
Variants§
Directive(PrologDirective)
A top-level directive.
Predicate(PrologPredicate)
A predicate (grouped clauses).
Clause(PrologClause)
A standalone clause (not grouped into a predicate).
Dcg(DcgRule)
A DCG grammar rule.
BlankLine
A blank line separator (for readability).
SectionComment(String)
A section comment % === ... ===.
LineComment(String)
A line comment.
Implementations§
Trait Implementations§
Source§impl Clone for PrologItem
impl Clone for PrologItem
Source§fn clone(&self) -> PrologItem
fn clone(&self) -> PrologItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrologItem
impl Debug for PrologItem
Source§impl PartialEq for PrologItem
impl PartialEq for PrologItem
impl StructuralPartialEq for PrologItem
Auto Trait Implementations§
impl Freeze for PrologItem
impl RefUnwindSafe for PrologItem
impl Send for PrologItem
impl Sync for PrologItem
impl Unpin for PrologItem
impl UnsafeUnpin for PrologItem
impl UnwindSafe for PrologItem
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