Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jaq-core/src/load/lex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use alloc::vec::Vec;
///
/// `S` is a type of strings (without escape sequences), and
/// `F` is a type of interpolated filters.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub enum StrPart<S, T> {
/// string without escape sequences
Str(S),
Expand Down
7 changes: 4 additions & 3 deletions jaq-core/src/load/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub struct Parser<'s, 't> {
}

/// Function from value to stream of values, such as `.[] | add / length`.
#[derive(Debug, Default)]
#[derive(Clone, Debug, Default)]
pub enum Term<S> {
/// Identity, i.e. `.`
#[default]
Expand Down Expand Up @@ -127,7 +127,7 @@ pub enum Term<S> {
}

/// Variable-binding pattern, such as in `.[] as [$x, {$y, (f): $z}]`
#[derive(Debug)]
#[derive(Clone, Debug)]
pub enum Pattern<S> {
/// Variable
Var(S),
Expand All @@ -138,7 +138,7 @@ pub enum Pattern<S> {
}

/// Binary operators, such as `|`, `,`, `//`, ...
#[derive(Debug)]
#[derive(Clone, Debug)]
pub enum BinaryOp<S> {
/// Application, i.e. `l | r` if no string is given, else `l as $x | r`
Pipe(Option<Pattern<S>>),
Expand Down Expand Up @@ -824,6 +824,7 @@ pub(crate) struct Module<S, B> {
/// def map(f): [.[] | f];
/// def recurse(f; cond): recurse(f | select(cond));
/// ~~~
#[derive(Clone)]
pub struct Def<S = &'static str, F = Term<S>> {
/// name, e.g. `"double"` or `"map"`
pub name: S,
Expand Down
Loading