forked from Orchid/orchid
Completed docs, added icon
This commit is contained in:
@@ -19,7 +19,9 @@ use crate::utils::Substack;
|
||||
/// A [Clause] with associated metadata
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct Expr {
|
||||
/// The actual value
|
||||
pub value: Clause,
|
||||
/// Information about the code that produced this value
|
||||
pub location: Location,
|
||||
}
|
||||
|
||||
@@ -87,7 +89,9 @@ pub enum PHClass {
|
||||
/// Properties of a placeholder that matches unknown tokens in macros
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
pub struct Placeholder {
|
||||
/// Identifier to pair placeholders in the pattern and template
|
||||
pub name: Tok<String>,
|
||||
/// The nature of the token set matched by this placeholder
|
||||
pub class: PHClass,
|
||||
}
|
||||
|
||||
@@ -321,8 +325,11 @@ impl InternedDisplay for Clause {
|
||||
/// A substitution rule as read from the source
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct Rule {
|
||||
/// Tree fragment in the source code that activates this rule
|
||||
pub pattern: Rc<Vec<Expr>>,
|
||||
/// Influences the order in which rules are checked
|
||||
pub prio: NotNan<f64>,
|
||||
/// Tree fragment generated by this rule
|
||||
pub template: Rc<Vec<Expr>>,
|
||||
}
|
||||
|
||||
@@ -386,7 +393,9 @@ impl InternedDisplay for Rule {
|
||||
/// A named constant
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct Constant {
|
||||
/// Used to reference the constant
|
||||
pub name: Tok<String>,
|
||||
/// The constant value inserted where the name is found
|
||||
pub value: Expr,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user