Skip to main content

Argument

Enum Argument 

Source
pub enum Argument {
    Variable(String),
    Marker(Marker),
    Pronoun(Pronoun),
    Description((Determiner, PredicateId)),
    Name(String),
    QuotedLiteral(String),
    Unspecified,
    Tagged((u8, ArgumentId)),
    ModalTagged((ModalTag, ArgumentId)),
    Restricted((ArgumentId, RelClause)),
    Number(f64),
    QuantifiedDescription((u32, Determiner, PredicateId)),
}
Expand description

A argument (argument term) in the AST.

Variants§

§

Variable(String)

A $-sigiled logic variable, preserved VERBATIM (the sigil IS the variable signal all the way through the IR — the interner and the free-variable/scope passes key on the $-prefixed string, and proof traces display it). INVARIANT: the payload starts with $; validate_ast_buffer rejects a sigil-less payload as corrupt (a bare name here would silently become a free, never-closed IR variable).

§

Marker(Marker)

A positional marker consumed by nibli-semantics (never a constant): it (bound entity), slot (open place), ? (witness).

§

Pronoun(Pronoun)

A fixed pronoun constant (me, you, we, we_all, …, it_u); lowers to an interned constant of its Pronoun::as_str spelling.

§

Description((Determiner, PredicateId))

Determiner description: some/the + predicate. Fields: (determiner, predicate-id).

§

Name(String)

Named entity: a capitalized rigid Name.

§

QuotedLiteral(String)

Quoted string literal: "any text".

§

Unspecified

Unspecified placeholder (_ or an omitted place).

§

Tagged((u8, ArgumentId))

Place-tagged argument: (zero-based place index 0..=4, inner-argument-id).

§

ModalTagged((ModalTag, ArgumentId))

Modal-tagged argument: (modal-tag, inner-argument-id).

§

Restricted((ArgumentId, RelClause))

Argument with a relative clause: (inner-argument-id, relative-clause).

§

Number(f64)

Numeric literal argument.

§

QuantifiedDescription((u32, Determiner, PredicateId))

Quantified description: exactly N + determiner + predicate. Fields: (count, determiner, predicate-id).

Trait Implementations§

Source§

impl Clone for Argument

Source§

fn clone(&self) -> Argument

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Argument

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.