mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
add suffixed:u8 to Expr::Var
This commit is contained in:
parent
a418bf4fb8
commit
0a3b9c34b3
134 changed files with 466 additions and 107 deletions
|
@ -692,7 +692,7 @@ impl<'a> RemoveSpaces<'a> for Expr<'a> {
|
|||
Expr::Record(a) => Expr::Record(a.remove_spaces(arena)),
|
||||
Expr::RecordBuilder(a) => Expr::RecordBuilder(a.remove_spaces(arena)),
|
||||
Expr::Tuple(a) => Expr::Tuple(a.remove_spaces(arena)),
|
||||
Expr::Var { module_name, ident } => Expr::Var { module_name, ident },
|
||||
Expr::Var { module_name, ident, suffixed } => Expr::Var { module_name, ident, suffixed },
|
||||
Expr::Underscore(a) => Expr::Underscore(a),
|
||||
Expr::Tag(a) => Expr::Tag(a),
|
||||
Expr::OpaqueRef(a) => Expr::OpaqueRef(a),
|
||||
|
|
|
@ -289,6 +289,7 @@ pub enum Expr<'a> {
|
|||
Var {
|
||||
module_name: &'a str, // module_name will only be filled if the original Roc code stated something like `5 + SomeModule.myVar`, module_name will be blank if it was `5 + myVar`
|
||||
ident: &'a str,
|
||||
suffixed: u8, // how many `!` suffixes, for example `doTheThing!!` executes a Task that returns a Task
|
||||
},
|
||||
|
||||
Underscore(&'a str),
|
||||
|
@ -1395,11 +1396,13 @@ impl<'a> Expr<'a> {
|
|||
pub const REPL_OPAQUE_FUNCTION: Self = Expr::Var {
|
||||
module_name: "",
|
||||
ident: "<function>",
|
||||
suffixed: 0,
|
||||
};
|
||||
|
||||
pub const REPL_RUNTIME_CRASH: Self = Expr::Var {
|
||||
module_name: "",
|
||||
ident: "*",
|
||||
suffixed: 0,
|
||||
};
|
||||
|
||||
pub fn loc_ref(&'a self, region: Region) -> Loc<&'a Self> {
|
||||
|
|
|
@ -42,7 +42,7 @@ pub enum Ident<'a> {
|
|||
Access {
|
||||
module_name: &'a str,
|
||||
parts: &'a [Accessor<'a>],
|
||||
suffixed: bool,
|
||||
suffixed: u8,
|
||||
},
|
||||
/// `.foo { foo: 42 }` or `.1 (1, 2, 3)`
|
||||
AccessorFunction(Accessor<'a>),
|
||||
|
@ -192,7 +192,7 @@ pub fn parse_ident<'a>(
|
|||
|
||||
match chomp_identifier_chain(arena, state.bytes(), state.pos()) {
|
||||
Ok((width, ident)) => {
|
||||
let state = advance_state!(state, width as usize)?;
|
||||
let mut state = advance_state!(state, width as usize)?;
|
||||
if let Ident::Access {
|
||||
module_name, parts, ..
|
||||
} = ident
|
||||
|
@ -206,21 +206,20 @@ pub fn parse_ident<'a>(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Parse a suffixed `!` expression
|
||||
if state.bytes().starts_with(b"!") {
|
||||
if let Ident::Access {
|
||||
module_name, parts, ..
|
||||
} = ident
|
||||
{
|
||||
let new_ident = Ident::Access {
|
||||
module_name,
|
||||
parts,
|
||||
suffixed: true,
|
||||
};
|
||||
return Ok((MadeProgress, new_ident, state.advance(1)));
|
||||
// Parse any `!` suffixes
|
||||
let mut suffixed = 0u8;
|
||||
while state.bytes().starts_with(b"!") {
|
||||
suffixed = suffixed.saturating_add(1);
|
||||
state = state.advance(1);
|
||||
}
|
||||
|
||||
let new_ident = Ident::Access {
|
||||
module_name,
|
||||
parts,
|
||||
suffixed,
|
||||
};
|
||||
return Ok((MadeProgress, new_ident, state));
|
||||
}
|
||||
|
||||
Ok((MadeProgress, ident, state))
|
||||
|
@ -534,7 +533,7 @@ fn chomp_identifier_chain<'a>(
|
|||
let ident = Ident::Access {
|
||||
module_name,
|
||||
parts: parts.into_bump_slice(),
|
||||
suffixed: false,
|
||||
suffixed: 0,
|
||||
};
|
||||
|
||||
Ok((chomped as u32, ident))
|
||||
|
@ -570,7 +569,7 @@ fn chomp_identifier_chain<'a>(
|
|||
let ident = Ident::Access {
|
||||
module_name: "",
|
||||
parts: arena.alloc([Accessor::RecordField(value)]),
|
||||
suffixed: false,
|
||||
suffixed: 0,
|
||||
};
|
||||
Ok((chomped as u32, ident))
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ pub fn loc_pattern_help<'a>() -> impl Parser<'a, Loc<Pattern<'a>>, EPattern<'a>>
|
|||
let pattern_state = state.clone();
|
||||
|
||||
// Return early with the suffixed statement
|
||||
if let Pattern::Stmt(_) = pattern.value {
|
||||
if let Pattern::BangSuffixed(_,_) = pattern.value {
|
||||
return Ok((MadeProgress, pattern, pattern_state));
|
||||
}
|
||||
|
||||
|
@ -397,14 +397,14 @@ fn loc_ident_pattern_help<'a>(
|
|||
parts,
|
||||
suffixed,
|
||||
..
|
||||
} if suffixed => {
|
||||
} if suffixed > 0 => {
|
||||
if module_name.is_empty() && parts.len() == 1 {
|
||||
if let Accessor::RecordField(var) = &parts[0] {
|
||||
return Ok((
|
||||
MadeProgress,
|
||||
Loc {
|
||||
region: loc_ident.region,
|
||||
value: Pattern::Stmt(var),
|
||||
value: Pattern::BangSuffixed(var, suffixed),
|
||||
},
|
||||
state,
|
||||
));
|
||||
|
@ -416,7 +416,7 @@ fn loc_ident_pattern_help<'a>(
|
|||
MadeProgress,
|
||||
Loc {
|
||||
region: loc_ident.region,
|
||||
value: Pattern::Stmt(arena.alloc(format!("{}.{}", module_name, var))),
|
||||
value: Pattern::BangSuffixed(arena.alloc(format!("{}.{}", module_name, var)), suffixed),
|
||||
},
|
||||
state,
|
||||
));
|
||||
|
|
|
@ -175,6 +175,7 @@ mod test_parse {
|
|||
let expr = arena.alloc(Var {
|
||||
module_name: "",
|
||||
ident: "name",
|
||||
suffixed: false,
|
||||
});
|
||||
|
||||
bumpalo::vec![in arena;
|
||||
|
@ -191,6 +192,7 @@ mod test_parse {
|
|||
let expr = arena.alloc(Var {
|
||||
module_name: "",
|
||||
ident: "name",
|
||||
suffixed: false,
|
||||
});
|
||||
|
||||
bumpalo::vec![in arena;
|
||||
|
@ -236,6 +238,7 @@ mod test_parse {
|
|||
let expr = arena.alloc(Var {
|
||||
module_name: "",
|
||||
ident: "name",
|
||||
suffixed: false,
|
||||
});
|
||||
|
||||
bumpalo::vec![in arena;
|
||||
|
@ -251,11 +254,13 @@ mod test_parse {
|
|||
let expr1 = arena.alloc(Var {
|
||||
module_name: "",
|
||||
ident: "name",
|
||||
suffixed: false,
|
||||
});
|
||||
|
||||
let expr2 = arena.alloc(Var {
|
||||
module_name: "",
|
||||
ident: "project",
|
||||
suffixed: false,
|
||||
});
|
||||
|
||||
bumpalo::vec![in arena;
|
||||
|
@ -276,11 +281,13 @@ mod test_parse {
|
|||
let expr1 = arena.alloc(Var {
|
||||
module_name: "",
|
||||
ident: "name",
|
||||
suffixed: false,
|
||||
});
|
||||
|
||||
let expr2 = arena.alloc(Var {
|
||||
module_name: "",
|
||||
ident: "project",
|
||||
suffixed: false,
|
||||
});
|
||||
|
||||
bumpalo::vec![in arena;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Expr(BadExprEnd(@14), @0)
|
|
@ -1,2 +0,0 @@
|
|||
Stdout.line!
|
||||
"Not the same ident, shouldn't parse as an single expr"
|
|
@ -1 +0,0 @@
|
|||
Expr(BadExprEnd(@13), @0)
|
|
@ -1,3 +0,0 @@
|
|||
line! "Foo"
|
||||
|
||||
read "Bar"
|
|
@ -2,6 +2,7 @@ When(
|
|||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
WhenBranch {
|
||||
|
|
|
@ -2,6 +2,7 @@ When(
|
|||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
WhenBranch {
|
||||
|
|
|
@ -4,6 +4,7 @@ BinOps(
|
|||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
@2-3 Plus,
|
||||
),
|
||||
|
|
|
@ -86,6 +86,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -96,6 +96,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -78,6 +78,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -2,19 +2,23 @@ Apply(
|
|||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@2-3 Var {
|
||||
module_name: "",
|
||||
ident: "b",
|
||||
suffixed: 0,
|
||||
},
|
||||
@4-5 Var {
|
||||
module_name: "",
|
||||
ident: "c",
|
||||
suffixed: 0,
|
||||
},
|
||||
@6-7 Var {
|
||||
module_name: "",
|
||||
ident: "d",
|
||||
suffixed: 0,
|
||||
},
|
||||
],
|
||||
Space,
|
||||
|
|
|
@ -2,6 +2,7 @@ Apply(
|
|||
@0-4 Var {
|
||||
module_name: "",
|
||||
ident: "whee",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@6-8 Num(
|
||||
|
|
|
@ -3,6 +3,7 @@ Apply(
|
|||
@1-5 Var {
|
||||
module_name: "",
|
||||
ident: "whee",
|
||||
suffixed: 0,
|
||||
},
|
||||
@0-1 Negate,
|
||||
),
|
||||
|
@ -13,6 +14,7 @@ Apply(
|
|||
@10-13 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
suffixed: 0,
|
||||
},
|
||||
],
|
||||
Space,
|
||||
|
|
|
@ -3,6 +3,7 @@ Apply(
|
|||
@1-5 Var {
|
||||
module_name: "",
|
||||
ident: "whee",
|
||||
suffixed: 0,
|
||||
},
|
||||
@0-1 Not,
|
||||
),
|
||||
|
@ -13,6 +14,7 @@ Apply(
|
|||
@10-13 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
suffixed: 0,
|
||||
},
|
||||
],
|
||||
Space,
|
||||
|
|
|
@ -2,6 +2,7 @@ Apply(
|
|||
@0-4 Var {
|
||||
module_name: "",
|
||||
ident: "whee",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@5-6 Num(
|
||||
|
|
|
@ -2,6 +2,7 @@ RecordAccess(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "rec",
|
||||
suffixed: 0,
|
||||
},
|
||||
"field",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "whee",
|
||||
suffixed: 0,
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ Apply(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -4,6 +4,7 @@ BinOps(
|
|||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
@2-4 And,
|
||||
),
|
||||
|
@ -18,6 +19,7 @@ BinOps(
|
|||
@9-10 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
[
|
||||
|
|
|
@ -4,6 +4,7 @@ BinOps(
|
|||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
suffixed: 0,
|
||||
},
|
||||
@1-2 GreaterThan,
|
||||
),
|
||||
|
@ -19,6 +20,7 @@ BinOps(
|
|||
@6-7 Var {
|
||||
module_name: "",
|
||||
ident: "s",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
[
|
||||
|
@ -30,6 +32,7 @@ BinOps(
|
|||
@9-10 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
@8-9 Negate,
|
||||
),
|
||||
|
|
|
@ -30,6 +30,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "q",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
|
|
|
@ -3,6 +3,7 @@ ParensAround(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
|
|
|
@ -46,6 +46,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "j",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -36,6 +36,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "e",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -98,11 +98,13 @@ Defs(
|
|||
@50-53 Var {
|
||||
module_name: "",
|
||||
ident: "try",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@54-57 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
suffixed: 0,
|
||||
},
|
||||
@59-73 ParensAround(
|
||||
Closure(
|
||||
|
|
|
@ -28,5 +28,6 @@ Defs(
|
|||
@4-5 Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
suffixed: 0,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -46,6 +46,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "str",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -2,6 +2,7 @@ RecordUpdate {
|
|||
update: @1-2 Var {
|
||||
module_name: "",
|
||||
ident: "e",
|
||||
suffixed: 0,
|
||||
},
|
||||
fields: [],
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ BinOps(
|
|||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
@1-3 Equals,
|
||||
),
|
||||
|
@ -11,5 +12,6 @@ BinOps(
|
|||
@3-4 Var {
|
||||
module_name: "",
|
||||
ident: "y",
|
||||
suffixed: 0,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -4,6 +4,7 @@ BinOps(
|
|||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
@2-4 Equals,
|
||||
),
|
||||
|
@ -11,5 +12,6 @@ BinOps(
|
|||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "y",
|
||||
suffixed: 0,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -33,6 +33,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -123,6 +123,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "table",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -101,6 +101,7 @@ Defs(
|
|||
@31-32 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
},
|
||||
|
@ -111,6 +112,7 @@ Defs(
|
|||
@34-35 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@36-47 Tuple(
|
||||
|
|
|
@ -87,6 +87,7 @@ Defs(
|
|||
@33-34 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
@36-41 BinOps(
|
||||
[
|
||||
|
@ -94,6 +95,7 @@ Defs(
|
|||
@36-37 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
@38-39 Plus,
|
||||
),
|
||||
|
@ -113,6 +115,7 @@ Defs(
|
|||
@44-45 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@46-48 Num(
|
||||
|
|
|
@ -18,6 +18,7 @@ BinOps(
|
|||
Var {
|
||||
module_name: "Str",
|
||||
ident: "toUtf8",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
@ -31,6 +32,7 @@ BinOps(
|
|||
@28-36 Var {
|
||||
module_name: "List",
|
||||
ident: "map",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@37-54 Closure(
|
||||
|
@ -45,6 +47,7 @@ BinOps(
|
|||
@46-50 Var {
|
||||
module_name: "",
|
||||
ident: "byte",
|
||||
suffixed: 0,
|
||||
},
|
||||
@51-52 Plus,
|
||||
),
|
||||
|
@ -67,5 +70,6 @@ BinOps(
|
|||
@58-70 Var {
|
||||
module_name: "List",
|
||||
ident: "reverse",
|
||||
suffixed: 0,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -38,6 +38,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
@ -47,6 +48,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "b",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -19,5 +19,6 @@ BinOps(
|
|||
@6-7 Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
suffixed: 0,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -50,6 +50,7 @@ Defs {
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -11,6 +11,7 @@ Backpassing(
|
|||
@8-17 Var {
|
||||
module_name: "List",
|
||||
ident: "map2",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@18-20 List(
|
||||
|
@ -29,6 +30,7 @@ Backpassing(
|
|||
@25-26 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
@27-28 Plus,
|
||||
),
|
||||
|
@ -36,6 +38,7 @@ Backpassing(
|
|||
@29-30 Var {
|
||||
module_name: "",
|
||||
ident: "y",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
[
|
||||
|
|
|
@ -32,6 +32,7 @@ Defs {
|
|||
@26-27 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@28-30 Record(
|
||||
|
|
|
@ -17,6 +17,7 @@ Backpassing(
|
|||
@10-11 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
@12-13 SpaceBefore(
|
||||
Tag(
|
||||
|
|
|
@ -2,6 +2,7 @@ Apply(
|
|||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "e",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@1-10 Str(
|
||||
|
|
|
@ -4,6 +4,7 @@ RecordAccess(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "rec",
|
||||
suffixed: 0,
|
||||
},
|
||||
"abc",
|
||||
),
|
||||
|
|
|
@ -2,6 +2,7 @@ UnaryOp(
|
|||
@1-4 Var {
|
||||
module_name: "",
|
||||
ident: "inf",
|
||||
suffixed: 0,
|
||||
},
|
||||
@0-1 Negate,
|
||||
)
|
||||
|
|
|
@ -33,12 +33,14 @@ Defs(
|
|||
@6-7 Var {
|
||||
module_name: "",
|
||||
ident: "g",
|
||||
suffixed: 0,
|
||||
},
|
||||
@5-6 Negate,
|
||||
),
|
||||
@8-9 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
],
|
||||
Space,
|
||||
|
@ -50,6 +52,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -51,6 +51,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
@ -60,6 +61,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "bar",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
@ -73,6 +75,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "task",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -95,6 +95,7 @@ Defs {
|
|||
@81-85 Var {
|
||||
module_name: "",
|
||||
ident: "num1",
|
||||
suffixed: 0,
|
||||
},
|
||||
@86-88 NotEquals,
|
||||
),
|
||||
|
@ -102,6 +103,7 @@ Defs {
|
|||
@89-93 Var {
|
||||
module_name: "",
|
||||
ident: "num2",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
[
|
||||
|
@ -117,6 +119,7 @@ Defs {
|
|||
@99-111 Var {
|
||||
module_name: "",
|
||||
ident: "wrappedNotEq",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@112-113 Num(
|
||||
|
|
|
@ -4,6 +4,7 @@ If(
|
|||
@3-5 Var {
|
||||
module_name: "",
|
||||
ident: "t1",
|
||||
suffixed: 0,
|
||||
},
|
||||
@13-14 SpaceBefore(
|
||||
SpaceAfter(
|
||||
|
@ -23,6 +24,7 @@ If(
|
|||
@23-25 Var {
|
||||
module_name: "",
|
||||
ident: "t2",
|
||||
suffixed: 0,
|
||||
},
|
||||
@33-34 SpaceBefore(
|
||||
SpaceAfter(
|
||||
|
|
|
@ -108,6 +108,7 @@ Full {
|
|||
@210-221 Var {
|
||||
module_name: "Stdout",
|
||||
ident: "line",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@222-246 Str(
|
||||
|
|
|
@ -43,6 +43,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "p",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -32,6 +32,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -15,6 +15,7 @@ SpaceBefore(
|
|||
@30-31 Var {
|
||||
module_name: "",
|
||||
ident: "y",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
),
|
||||
|
@ -22,6 +23,7 @@ SpaceBefore(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -30,6 +30,7 @@ Defs(
|
|||
@12-14 Var {
|
||||
module_name: "",
|
||||
ident: "id",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@16-21 ParensAround(
|
||||
|
@ -56,6 +57,7 @@ Defs(
|
|||
@23-25 Var {
|
||||
module_name: "",
|
||||
ident: "it",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@26-28 Record(
|
||||
|
|
|
@ -6,10 +6,12 @@ Apply(
|
|||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "m",
|
||||
suffixed: 0,
|
||||
},
|
||||
@7-8 Var {
|
||||
module_name: "",
|
||||
ident: "n",
|
||||
suffixed: 0,
|
||||
},
|
||||
],
|
||||
Space,
|
||||
|
|
|
@ -2,6 +2,7 @@ When(
|
|||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "n",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
WhenBranch {
|
||||
|
|
|
@ -2,6 +2,7 @@ When(
|
|||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "n",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
WhenBranch {
|
||||
|
@ -31,6 +32,7 @@ When(
|
|||
@24-25 Var {
|
||||
module_name: "",
|
||||
ident: "n",
|
||||
suffixed: 0,
|
||||
},
|
||||
@26-27 Plus,
|
||||
),
|
||||
|
@ -38,6 +40,7 @@ When(
|
|||
@28-29 Var {
|
||||
module_name: "",
|
||||
ident: "m",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
guard: None,
|
||||
|
|
|
@ -50,5 +50,6 @@ Defs(
|
|||
@12-14 Var {
|
||||
module_name: "",
|
||||
ident: "e0",
|
||||
suffixed: 0,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -23,6 +23,7 @@ Defs(
|
|||
@4-7 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@9-28 ParensAround(
|
||||
|
@ -30,6 +31,7 @@ Defs(
|
|||
@9-12 Var {
|
||||
module_name: "",
|
||||
ident: "baz",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@13-28 Record(
|
||||
|
@ -42,6 +44,7 @@ Defs(
|
|||
@22-26 Var {
|
||||
module_name: "",
|
||||
ident: "blah",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
[
|
||||
|
@ -68,6 +71,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -23,6 +23,7 @@ Defs(
|
|||
@4-7 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@8-22 Record(
|
||||
|
@ -38,6 +39,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "blah",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
@ -64,6 +66,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -49,6 +49,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -23,6 +23,7 @@ Defs(
|
|||
@4-7 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@8-23 Record(
|
||||
|
@ -35,6 +36,7 @@ Defs(
|
|||
@17-21 Var {
|
||||
module_name: "",
|
||||
ident: "blah",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
[
|
||||
|
@ -57,6 +59,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -41,6 +41,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -44,6 +44,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -30,6 +30,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -30,6 +30,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -3,6 +3,7 @@ Apply(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "whee",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
[
|
||||
|
|
|
@ -3,6 +3,7 @@ RecordAccess(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "rec",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
"field",
|
||||
|
|
|
@ -3,6 +3,7 @@ RecordAccess(
|
|||
Var {
|
||||
module_name: "One.Two",
|
||||
ident: "rec",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
"field",
|
||||
|
|
|
@ -2,5 +2,6 @@ ParensAround(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "whee",
|
||||
suffixed: 0,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -26,6 +26,7 @@ When(
|
|||
value: @24-25 Var {
|
||||
module_name: "",
|
||||
ident: "n",
|
||||
suffixed: 0,
|
||||
},
|
||||
guard: None,
|
||||
},
|
||||
|
|
|
@ -2,6 +2,7 @@ When(
|
|||
@5-11 Var {
|
||||
module_name: "",
|
||||
ident: "myList",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
WhenBranch {
|
||||
|
|
|
@ -13,6 +13,7 @@ When(
|
|||
@17-19 Var {
|
||||
module_name: "",
|
||||
ident: "rx",
|
||||
suffixed: 0,
|
||||
},
|
||||
],
|
||||
Space,
|
||||
|
@ -67,10 +68,12 @@ When(
|
|||
@65-75 Var {
|
||||
module_name: "Bool",
|
||||
ident: "false",
|
||||
suffixed: 0,
|
||||
},
|
||||
@76-78 Var {
|
||||
module_name: "",
|
||||
ident: "ry",
|
||||
suffixed: 0,
|
||||
},
|
||||
],
|
||||
Space,
|
||||
|
|
|
@ -13,6 +13,7 @@ BinOps(
|
|||
@7-16 Var {
|
||||
module_name: "Bool",
|
||||
ident: "true",
|
||||
suffixed: 0,
|
||||
},
|
||||
@22-23 Num(
|
||||
"1",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "inf",
|
||||
suffixed: 0,
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ RecordAccess(
|
|||
Var {
|
||||
module_name: "One.Two",
|
||||
ident: "rec",
|
||||
suffixed: 0,
|
||||
},
|
||||
"abc",
|
||||
),
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Var {
|
||||
module_name: "One.Two",
|
||||
ident: "whee",
|
||||
suffixed: 0,
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ RecordUpdate {
|
|||
update: @2-13 Var {
|
||||
module_name: "Foo.Bar",
|
||||
ident: "baz",
|
||||
suffixed: 0,
|
||||
},
|
||||
fields: [
|
||||
@16-20 RequiredValue(
|
||||
|
|
|
@ -9,6 +9,7 @@ Record(
|
|||
@8-17 Var {
|
||||
module_name: "Bool",
|
||||
ident: "true",
|
||||
suffixed: 0,
|
||||
},
|
||||
@23-24 Num(
|
||||
"1",
|
||||
|
|
|
@ -100,6 +100,7 @@ Full {
|
|||
@105-116 Var {
|
||||
module_name: "Stdout",
|
||||
ident: "line",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@117-124 Str(
|
||||
|
|
|
@ -4,6 +4,7 @@ BinOps(
|
|||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
@1-2 Minus,
|
||||
),
|
||||
|
@ -11,5 +12,6 @@ BinOps(
|
|||
@3-4 Var {
|
||||
module_name: "",
|
||||
ident: "y",
|
||||
suffixed: 0,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -4,6 +4,7 @@ BinOps(
|
|||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
@2-3 Minus,
|
||||
),
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
Suffixed(
|
||||
Var {
|
||||
module_name: "Stdout",
|
||||
ident: "line",
|
||||
},
|
||||
)
|
||||
Var {
|
||||
module_name: "Stdout",
|
||||
ident: "line",
|
||||
suffixed: 3,
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Stdout.line!
|
||||
Stdout.line!!!
|
|
@ -1,6 +1,5 @@
|
|||
# valid as a single line
|
||||
A.x! "Foo" []
|
||||
|
||||
# valid as a multi-line, with increased ident
|
||||
B.y!
|
||||
"Bar"
|
||||
|
|
|
@ -9,35 +9,26 @@ Defs {
|
|||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 1),
|
||||
Slice(start = 1, length = 3),
|
||||
Slice(start = 1, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 1, length = 0),
|
||||
Slice(start = 4, length = 0),
|
||||
Slice(start = 1, length = 0),
|
||||
],
|
||||
spaces: [
|
||||
LineComment(
|
||||
" valid as a single line",
|
||||
),
|
||||
Newline,
|
||||
Newline,
|
||||
LineComment(
|
||||
" valid as a multi-line, with increased ident",
|
||||
),
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@25-29 RecordDestructure(
|
||||
[],
|
||||
),
|
||||
Stmt(
|
||||
@25-44 Apply(
|
||||
@25-29 Suffixed(
|
||||
Var {
|
||||
module_name: "A",
|
||||
ident: "x",
|
||||
},
|
||||
),
|
||||
@25-29 Var {
|
||||
module_name: "A",
|
||||
ident: "x",
|
||||
suffixed: 1,
|
||||
},
|
||||
[
|
||||
@33-38 Str(
|
||||
PlainLine(
|
||||
|
@ -51,57 +42,64 @@ Defs {
|
|||
Space,
|
||||
),
|
||||
),
|
||||
Body(
|
||||
@92-96 RecordDestructure(
|
||||
[],
|
||||
),
|
||||
@92-131 Apply(
|
||||
@92-96 Suffixed(
|
||||
Var {
|
||||
Stmt(
|
||||
@92-131 SpaceBefore(
|
||||
Apply(
|
||||
@92-96 Var {
|
||||
module_name: "B",
|
||||
ident: "y",
|
||||
suffixed: 1,
|
||||
},
|
||||
),
|
||||
[
|
||||
@106-111 SpaceBefore(
|
||||
Str(
|
||||
PlainLine(
|
||||
"Bar",
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@120-131 SpaceBefore(
|
||||
Closure(
|
||||
[
|
||||
@121-122 Identifier(
|
||||
"a",
|
||||
[
|
||||
@106-111 SpaceBefore(
|
||||
Str(
|
||||
PlainLine(
|
||||
"Bar",
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
@126-131 BinOps(
|
||||
),
|
||||
@120-131 SpaceBefore(
|
||||
Closure(
|
||||
[
|
||||
(
|
||||
@126-127 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
@128-129 Plus,
|
||||
@121-122 Identifier(
|
||||
"a",
|
||||
),
|
||||
],
|
||||
@130-131 Var {
|
||||
module_name: "",
|
||||
ident: "y",
|
||||
},
|
||||
@126-131 BinOps(
|
||||
[
|
||||
(
|
||||
@126-127 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
@128-129 Plus,
|
||||
),
|
||||
],
|
||||
@130-131 Var {
|
||||
module_name: "",
|
||||
ident: "y",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
LineComment(
|
||||
" valid as a multi-line, with increased ident",
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
Apply(
|
||||
@0-4 Suffixed(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
},
|
||||
),
|
||||
@0-4 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
suffixed: 1,
|
||||
},
|
||||
[
|
||||
@9-17 ParensAround(
|
||||
Apply(
|
||||
@9-13 Suffixed(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "bar",
|
||||
},
|
||||
),
|
||||
@9-13 Var {
|
||||
module_name: "",
|
||||
ident: "bar",
|
||||
suffixed: 1,
|
||||
},
|
||||
[
|
||||
@14-17 Var {
|
||||
module_name: "",
|
||||
ident: "baz",
|
||||
suffixed: 0,
|
||||
},
|
||||
],
|
||||
Space,
|
||||
|
@ -28,11 +27,13 @@ Apply(
|
|||
@22-26 Var {
|
||||
module_name: "",
|
||||
ident: "blah",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@27-32 Var {
|
||||
module_name: "",
|
||||
ident: "stuff",
|
||||
suffixed: 0,
|
||||
},
|
||||
],
|
||||
Space,
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
app ""
|
||||
packages {
|
||||
cli: "",
|
||||
}
|
||||
imports []
|
||||
provides [main] to cli
|
||||
|
||||
main =
|
||||
"jq --version"
|
||||
|> Cmd.new
|
||||
|> Cmd.status
|
||||
|> Task.mapErr! UnableToCheckJQVersion
|
|
@ -0,0 +1,165 @@
|
|||
Full {
|
||||
header: Module {
|
||||
comments: [],
|
||||
header: App(
|
||||
AppHeader {
|
||||
before_name: [],
|
||||
name: @4-6 PlainLine(
|
||||
"",
|
||||
),
|
||||
packages: Some(
|
||||
KeywordItem {
|
||||
keyword: Spaces {
|
||||
before: [
|
||||
Newline,
|
||||
],
|
||||
item: PackagesKeyword,
|
||||
after: [],
|
||||
},
|
||||
item: Collection {
|
||||
items: [
|
||||
@30-37 SpaceBefore(
|
||||
PackageEntry {
|
||||
shorthand: "cli",
|
||||
spaces_after_shorthand: [],
|
||||
package_name: @35-37 PackageName(
|
||||
"",
|
||||
),
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
final_comments: [
|
||||
Newline,
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
imports: Some(
|
||||
KeywordItem {
|
||||
keyword: Spaces {
|
||||
before: [
|
||||
Newline,
|
||||
],
|
||||
item: ImportsKeyword,
|
||||
after: [],
|
||||
},
|
||||
item: [],
|
||||
},
|
||||
),
|
||||
provides: ProvidesTo {
|
||||
provides_keyword: Spaces {
|
||||
before: [
|
||||
Newline,
|
||||
],
|
||||
item: ProvidesKeyword,
|
||||
after: [],
|
||||
},
|
||||
entries: [
|
||||
@74-78 ExposedName(
|
||||
"main",
|
||||
),
|
||||
],
|
||||
types: None,
|
||||
to_keyword: Spaces {
|
||||
before: [],
|
||||
item: ToKeyword,
|
||||
after: [],
|
||||
},
|
||||
to: @83-86 ExistingPackage(
|
||||
"cli",
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
module_defs: Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@88-202,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 2),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 2, length = 0),
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@88-92 Identifier(
|
||||
"main",
|
||||
),
|
||||
@100-202 SpaceBefore(
|
||||
BinOps(
|
||||
[
|
||||
(
|
||||
@100-114 SpaceAfter(
|
||||
Str(
|
||||
PlainLine(
|
||||
"jq --version",
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@123-125 Pizza,
|
||||
),
|
||||
(
|
||||
@126-133 SpaceAfter(
|
||||
Var {
|
||||
module_name: "Cmd",
|
||||
ident: "new",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@142-144 Pizza,
|
||||
),
|
||||
(
|
||||
@145-155 SpaceAfter(
|
||||
Var {
|
||||
module_name: "Cmd",
|
||||
ident: "status",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@164-166 Pizza,
|
||||
),
|
||||
],
|
||||
@167-202 Apply(
|
||||
@167-179 Var {
|
||||
module_name: "Task",
|
||||
ident: "mapErr",
|
||||
suffixed: 1,
|
||||
},
|
||||
[
|
||||
@180-202 Tag(
|
||||
"UnableToCheckJQVersion",
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
app ""
|
||||
packages {
|
||||
cli: "",
|
||||
}
|
||||
imports []
|
||||
provides [main] to cli
|
||||
|
||||
main =
|
||||
"jq --version"
|
||||
|> Cmd.new
|
||||
|> Cmd.status
|
||||
|> Task.mapErr! UnableToCheckJQVersion
|
|
@ -40,6 +40,7 @@ Defs(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "abc",
|
||||
suffixed: 0,
|
||||
},
|
||||
"0",
|
||||
),
|
||||
|
|
|
@ -105,6 +105,7 @@ Defs(
|
|||
@38-39 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
},
|
||||
|
@ -115,6 +116,7 @@ Defs(
|
|||
@41-42 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@43-49 Tuple(
|
||||
|
|
|
@ -121,6 +121,7 @@ Defs(
|
|||
@40-41 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
},
|
||||
|
@ -131,6 +132,7 @@ Defs(
|
|||
@43-44 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
@45-51 Tuple(
|
||||
|
|
|
@ -15,6 +15,7 @@ SpaceBefore(
|
|||
@30-31 Var {
|
||||
module_name: "",
|
||||
ident: "y",
|
||||
suffixed: 0,
|
||||
},
|
||||
),
|
||||
),
|
||||
|
@ -32,6 +33,7 @@ SpaceBefore(
|
|||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -2,6 +2,7 @@ When(
|
|||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
suffixed: 0,
|
||||
},
|
||||
[
|
||||
WhenBranch {
|
||||
|
|
|
@ -2,6 +2,7 @@ UnaryOp(
|
|||
@1-4 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
suffixed: 0,
|
||||
},
|
||||
@0-1 Negate,
|
||||
)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue