Compare commits
2 Commits
main
...
achalmers/
Author | SHA1 | Date | |
---|---|---|---|
1c9a613fbc | |||
3f3432cb73 |
@ -17,4 +17,4 @@ fn cube(length, center) {
|
||||
|> extrude(length = length)
|
||||
}
|
||||
|
||||
myCube = cube(40, [0,0])
|
||||
myCube = cube(length = 40, center = [0,0])
|
||||
|
@ -24,13 +24,12 @@ use crate::{
|
||||
parsing::{
|
||||
ast::types::{
|
||||
Annotation, ArrayExpression, ArrayRangeExpression, BinaryExpression, BinaryOperator, BinaryPart, BodyItem,
|
||||
BoxNode, CallExpression, CallExpressionKw, CommentStyle, DefaultParamVal, ElseIf, Expr,
|
||||
ExpressionStatement, FunctionExpression, Identifier, IfExpression, ImportItem, ImportSelector,
|
||||
ImportStatement, ItemVisibility, LabeledArg, Literal, LiteralIdentifier, LiteralValue, MemberExpression,
|
||||
MemberObject, Name, Node, NodeList, NonCodeMeta, NonCodeNode, NonCodeValue, ObjectExpression,
|
||||
ObjectProperty, Parameter, PipeExpression, PipeSubstitution, PrimitiveType, Program, ReturnStatement,
|
||||
Shebang, TagDeclarator, Type, TypeDeclaration, UnaryExpression, UnaryOperator, VariableDeclaration,
|
||||
VariableDeclarator, VariableKind,
|
||||
BoxNode, CallExpressionKw, CommentStyle, DefaultParamVal, ElseIf, Expr, ExpressionStatement,
|
||||
FunctionExpression, Identifier, IfExpression, ImportItem, ImportSelector, ImportStatement, ItemVisibility,
|
||||
LabeledArg, Literal, LiteralIdentifier, LiteralValue, MemberExpression, MemberObject, Name, Node, NodeList,
|
||||
NonCodeMeta, NonCodeNode, NonCodeValue, ObjectExpression, ObjectProperty, Parameter, PipeExpression,
|
||||
PipeSubstitution, PrimitiveType, Program, ReturnStatement, Shebang, TagDeclarator, Type, TypeDeclaration,
|
||||
UnaryExpression, UnaryOperator, VariableDeclaration, VariableDeclarator, VariableKind,
|
||||
},
|
||||
math::BinaryExpressionToken,
|
||||
token::{Token, TokenSlice, TokenType},
|
||||
@ -2054,7 +2053,6 @@ fn expr_allowed_in_pipe_expr(i: &mut TokenSlice) -> PResult<Expr> {
|
||||
bool_value.map(Expr::Literal),
|
||||
tag.map(Box::new).map(Expr::TagDeclarator),
|
||||
literal.map(Expr::Literal),
|
||||
fn_call.map(Box::new).map(Expr::CallExpression),
|
||||
fn_call_kw.map(Box::new).map(Expr::CallExpressionKw),
|
||||
name.map(Box::new).map(Expr::Name),
|
||||
array,
|
||||
@ -2074,7 +2072,6 @@ fn possible_operands(i: &mut TokenSlice) -> PResult<Expr> {
|
||||
bool_value.map(Expr::Literal),
|
||||
member_expression.map(Box::new).map(Expr::MemberExpression),
|
||||
literal.map(Expr::Literal),
|
||||
fn_call.map(Box::new).map(Expr::CallExpression),
|
||||
fn_call_kw.map(Box::new).map(Expr::CallExpressionKw),
|
||||
name.map(Box::new).map(Expr::Name),
|
||||
binary_expr_in_parens.map(Box::new).map(Expr::BinaryExpression),
|
||||
@ -2402,9 +2399,17 @@ impl TryFrom<Token> for Node<TagDeclarator> {
|
||||
token.value.as_str()
|
||||
),
|
||||
)),
|
||||
// e.g. `line(%, $)`
|
||||
TokenType::Brace => {
|
||||
let r = token.as_source_range();
|
||||
Err(CompilationError::fatal(
|
||||
SourceRange::new(r.start() - 1, r.end() - 1, r.module_id()),
|
||||
"Tag names must not be empty".to_string(),
|
||||
))
|
||||
}
|
||||
|
||||
// e.g. `line(%, $)` or `line(%, $ , 5)`
|
||||
TokenType::Brace | TokenType::Whitespace | TokenType::Comma => Err(CompilationError::fatal(
|
||||
// e.g. `line(%, $ , 5)`
|
||||
TokenType::Whitespace | TokenType::Comma => Err(CompilationError::fatal(
|
||||
token.as_source_range(),
|
||||
"Tag names must not be empty".to_string(),
|
||||
)),
|
||||
@ -2741,13 +2746,6 @@ fn pipe_sep(i: &mut TokenSlice) -> PResult<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Arguments are passed into a function.
|
||||
fn arguments(i: &mut TokenSlice) -> PResult<Vec<Expr>> {
|
||||
separated(0.., expression, comma_sep)
|
||||
.context(expected("function arguments"))
|
||||
.parse_next(i)
|
||||
}
|
||||
|
||||
fn labeled_argument(i: &mut TokenSlice) -> PResult<LabeledArg> {
|
||||
separated_pair(
|
||||
terminated(nameable_identifier, opt(whitespace)),
|
||||
@ -3016,11 +3014,7 @@ fn binding_name(i: &mut TokenSlice) -> PResult<Node<Identifier>> {
|
||||
|
||||
/// Either a positional or keyword function call.
|
||||
fn fn_call_pos_or_kw(i: &mut TokenSlice) -> PResult<Expr> {
|
||||
alt((
|
||||
fn_call.map(Box::new).map(Expr::CallExpression),
|
||||
fn_call_kw.map(Box::new).map(Expr::CallExpressionKw),
|
||||
))
|
||||
.parse_next(i)
|
||||
fn_call_kw.map(Box::new).map(Expr::CallExpressionKw).parse_next(i)
|
||||
}
|
||||
|
||||
fn labelled_fn_call(i: &mut TokenSlice) -> PResult<Expr> {
|
||||
@ -3033,56 +3027,62 @@ fn labelled_fn_call(i: &mut TokenSlice) -> PResult<Expr> {
|
||||
}
|
||||
}
|
||||
|
||||
fn fn_call(i: &mut TokenSlice) -> PResult<Node<CallExpression>> {
|
||||
let fn_name = name(i)?;
|
||||
opt(whitespace).parse_next(i)?;
|
||||
let _ = terminated(open_paren, opt(whitespace)).parse_next(i)?;
|
||||
let args = arguments(i)?;
|
||||
let end = preceded(opt(whitespace), close_paren).parse_next(i)?.end;
|
||||
|
||||
let result = Node::new_node(
|
||||
fn_name.start,
|
||||
end,
|
||||
fn_name.module_id,
|
||||
CallExpression {
|
||||
callee: fn_name,
|
||||
arguments: args,
|
||||
digest: None,
|
||||
},
|
||||
);
|
||||
|
||||
let callee_str = result.callee.name.name.to_string();
|
||||
if let Some(suggestion) = super::deprecation(&callee_str, DeprecationKind::Function) {
|
||||
ParseContext::warn(
|
||||
CompilationError::err(
|
||||
result.as_source_range(),
|
||||
format!("Calling `{}` is deprecated, prefer using `{}`.", callee_str, suggestion),
|
||||
)
|
||||
.with_suggestion(
|
||||
format!("Replace `{}` with `{}`", callee_str, suggestion),
|
||||
suggestion,
|
||||
None,
|
||||
Tag::Deprecated,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
fn fn_call_kw(i: &mut TokenSlice) -> PResult<Node<CallExpressionKw>> {
|
||||
let fn_name = name(i)?;
|
||||
opt(whitespace).parse_next(i)?;
|
||||
ignore_whitespace(i);
|
||||
let _ = open_paren.parse_next(i)?;
|
||||
ignore_whitespace(i);
|
||||
|
||||
// Special case: no args
|
||||
let early_close = peek(close_paren).parse_next(i);
|
||||
if early_close.is_ok() {
|
||||
let cl = close_paren.parse_next(i)?;
|
||||
let result = Node::new_node(
|
||||
fn_name.start,
|
||||
cl.end,
|
||||
fn_name.module_id,
|
||||
CallExpressionKw {
|
||||
callee: fn_name,
|
||||
unlabeled: Default::default(),
|
||||
arguments: Default::default(),
|
||||
digest: None,
|
||||
non_code_meta: Default::default(),
|
||||
},
|
||||
);
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
// Special case: one arg (unlabeled)
|
||||
let early_close = peek((expression, opt(whitespace), close_paren)).parse_next(i);
|
||||
if early_close.is_ok() {
|
||||
let first_expression = expression.parse_next(i)?;
|
||||
ignore_whitespace(i);
|
||||
let end = close_paren.parse_next(i)?.end;
|
||||
let result = Node::new_node(
|
||||
fn_name.start,
|
||||
end,
|
||||
fn_name.module_id,
|
||||
CallExpressionKw {
|
||||
callee: fn_name,
|
||||
unlabeled: Some(first_expression),
|
||||
arguments: Default::default(),
|
||||
digest: None,
|
||||
non_code_meta: Default::default(),
|
||||
},
|
||||
);
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
let initial_unlabeled_arg = opt((expression, comma, opt(whitespace)).map(|(arg, _, _)| arg)).parse_next(i)?;
|
||||
ignore_whitespace(i);
|
||||
|
||||
// Start parsing labeled args.
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
enum ArgPlace {
|
||||
NonCode(Node<NonCodeNode>),
|
||||
LabeledArg(LabeledArg),
|
||||
UnlabeledArg(Expr),
|
||||
}
|
||||
let initial_unlabeled_arg = opt((expression, comma, opt(whitespace)).map(|(arg, _, _)| arg)).parse_next(i)?;
|
||||
let args: Vec<_> = repeat(
|
||||
0..,
|
||||
alt((
|
||||
@ -3221,18 +3221,6 @@ mod tests {
|
||||
assert_reserved("import");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_args() {
|
||||
for (i, (test, expected_len)) in [("someVar", 1), ("5, 3", 2), (r#""a""#, 1)].into_iter().enumerate() {
|
||||
let tokens = crate::parsing::token::lex(test, ModuleId::default()).unwrap();
|
||||
let actual = match arguments.parse(tokens.as_slice()) {
|
||||
Ok(x) => x,
|
||||
Err(e) => panic!("Failed test {i}, could not parse function arguments from \"{test}\": {e:?}"),
|
||||
};
|
||||
assert_eq!(actual.len(), expected_len, "failed test {i}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_names() {
|
||||
for (test, expected_len) in [("someVar", 0), ("::foo", 0), ("foo::bar::baz", 2)] {
|
||||
@ -3863,7 +3851,7 @@ mySk1 = startSketchOn(XY)
|
||||
#[test]
|
||||
fn pipes_on_pipes_minimal() {
|
||||
let test_program = r#"startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(endAbsolute = [0, -0]) // MoveRelative
|
||||
|
||||
"#;
|
||||
@ -4134,7 +4122,7 @@ mySk1 = startSketchOn(XY)
|
||||
fn test_parse_half_pipe_small() {
|
||||
assert_err_contains(
|
||||
"secondExtrude = startSketchOn('XY')
|
||||
|> startProfileAt([0,0], %)
|
||||
|> startProfile(at = [0,0])
|
||||
|",
|
||||
"Unexpected token: |",
|
||||
);
|
||||
@ -4198,7 +4186,7 @@ height = [obj["a"] -1, 0]"#;
|
||||
|
||||
#[test]
|
||||
fn test_anon_fn() {
|
||||
crate::parsing::top_level_parse("foo(42, fn(x) { return x + 1 })").unwrap();
|
||||
crate::parsing::top_level_parse("foo(42, closure = fn(x) { return x + 1 })").unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -4227,15 +4215,15 @@ height = [obj["a"] -1, 0]"#;
|
||||
let code = "height = 10
|
||||
|
||||
firstExtrude = startSketchOn('XY')
|
||||
|> startProfileAt([0,0], %)
|
||||
|> line([0, 8], %)
|
||||
|> line([20, 0], %)
|
||||
|> line([0, -8], %)
|
||||
|> startProfile(at = [0,0])
|
||||
|> line(at = [0, 8])
|
||||
|> line(at = [20, 0])
|
||||
|> line(at = [0, -8])
|
||||
|> close()
|
||||
|> extrude(length=2)
|
||||
|
||||
secondExtrude = startSketchOn('XY')
|
||||
|> startProfileAt([0,0], %)
|
||||
|> startProfile(at = [0,0])
|
||||
|";
|
||||
assert_err_contains(code, "Unexpected token: |");
|
||||
}
|
||||
@ -4506,7 +4494,7 @@ e
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn("XZ")
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> angledLine(
|
||||
/// angle = 30,
|
||||
/// length = 3 / cos(toRadians(30)),
|
||||
@ -4546,7 +4534,7 @@ export fn cos(num: number(rad)): number(_) {}"#;
|
||||
|
||||
#[test]
|
||||
fn error_underscore() {
|
||||
let (_, errs) = assert_no_fatal("_foo(_blah, _)");
|
||||
let (_, errs) = assert_no_fatal("_foo(_blah, arg = _)");
|
||||
assert_eq!(errs.len(), 3, "found: {errs:#?}");
|
||||
}
|
||||
|
||||
@ -4692,16 +4680,16 @@ thing(false)
|
||||
fn test_member_expression_sketch() {
|
||||
let some_program_string = r#"fn cube = (pos, scale) => {
|
||||
sg = startSketchOn('XY')
|
||||
|> startProfileAt(pos, %)
|
||||
|> line([0, scale], %)
|
||||
|> line([scale, 0], %)
|
||||
|> line([0, -scale], %)
|
||||
|> startProfile(at = pos)
|
||||
|> line([0, scale])
|
||||
|> line([scale, 0])
|
||||
|> line([0, -scale])
|
||||
|
||||
return sg
|
||||
}
|
||||
|
||||
b1 = cube([0,0], 10)
|
||||
b2 = cube([3,3], 4)
|
||||
b1 = cube(pos = [0,0], scale = 10)
|
||||
b2 = cube(pos = [3,3], scale = 4)
|
||||
|
||||
pt1 = b1[0]
|
||||
pt2 = b2[0]
|
||||
@ -4720,16 +4708,16 @@ let other_thing = 2 * cos(3)"#;
|
||||
fn test_negative_arguments() {
|
||||
let some_program_string = r#"fn box = (p, h, l, w) => {
|
||||
myBox = startSketchOn('XY')
|
||||
|> startProfileAt(p, %)
|
||||
|> line([0, l], %)
|
||||
|> line([w, 0], %)
|
||||
|> line([0, -l], %)
|
||||
|> startProfile(at = p)
|
||||
|> line([0, l])
|
||||
|> line([w, 0])
|
||||
|> line([0, -l])
|
||||
|> close()
|
||||
|> extrude(length=h)
|
||||
|
||||
return myBox
|
||||
}
|
||||
let myBox = box([0,0], -3, -16, -10)
|
||||
let myBox = box(p=[0,0], h=-3, l=-16, w=-10)
|
||||
"#;
|
||||
crate::parsing::top_level_parse(some_program_string).unwrap();
|
||||
}
|
||||
@ -4746,28 +4734,28 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
#[test]
|
||||
fn test_parse_tag_named_std_lib() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line([5, 5], %, $xLine)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [5, 5], tag = $xLine)
|
||||
"#;
|
||||
assert_err(
|
||||
some_program_string,
|
||||
"Cannot assign a tag to a reserved keyword: xLine",
|
||||
[76, 82],
|
||||
[85, 91],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_empty_tag_brace() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [1, 1], tag = $)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not be empty", [69, 70]);
|
||||
assert_err(some_program_string, "Tag names must not be empty", [85, 86]);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_empty_tag_whitespace() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(%, $ ,01)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not be empty", [69, 70]);
|
||||
@ -4776,7 +4764,7 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
#[test]
|
||||
fn test_parse_empty_tag_comma() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(%, $,)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not be empty", [69, 70]);
|
||||
@ -4785,7 +4773,7 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
fn test_parse_tag_starting_with_digit() {
|
||||
let some_program_string = r#"
|
||||
startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(%, $01)"#;
|
||||
assert_err(
|
||||
some_program_string,
|
||||
@ -4797,14 +4785,14 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
fn test_parse_tag_including_digit() {
|
||||
let some_program_string = r#"
|
||||
startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $var01)"#;
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(%, tag = $var01)"#;
|
||||
assert_no_err(some_program_string);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_tag_starting_with_bang() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(%, $!var,01)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not start with a bang", [69, 70]);
|
||||
@ -4812,7 +4800,7 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
#[test]
|
||||
fn test_parse_tag_starting_with_dollar() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(%, $$,01)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not start with a dollar", [69, 70]);
|
||||
@ -4820,7 +4808,7 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
#[test]
|
||||
fn test_parse_tag_starting_with_fn() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(%, $fn,01)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not start with a keyword", [69, 71]);
|
||||
@ -4828,7 +4816,7 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
#[test]
|
||||
fn test_parse_tag_starting_with_a_comment() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(%, $//
|
||||
,01)
|
||||
"#;
|
||||
@ -4843,8 +4831,8 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
fn test_parse_tag_with_reserved_in_middle_works() {
|
||||
let some_program_string = r#"
|
||||
startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line([5, 5], %, $sketching)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [5, 5], tag = $sketching)
|
||||
"#;
|
||||
assert_no_err(some_program_string);
|
||||
}
|
||||
@ -4995,7 +4983,7 @@ bar = 1
|
||||
}"#
|
||||
);
|
||||
|
||||
let some_program_string = r#"myMap = map([0..5], (n) => {
|
||||
let some_program_string = r#"myMap = map([0..5], f = (n) => {
|
||||
return n * 2
|
||||
})"#;
|
||||
let (_, errs) = assert_no_err(some_program_string);
|
||||
@ -5004,7 +4992,7 @@ bar = 1
|
||||
let replaced = errs[1].apply_suggestion(&replaced).unwrap();
|
||||
assert_eq!(
|
||||
replaced,
|
||||
r#"myMap = map([0..5], fn(n) {
|
||||
r#"myMap = map([0..5], f = fn(n) {
|
||||
return n * 2
|
||||
})"#
|
||||
);
|
||||
@ -5182,20 +5170,9 @@ mod snapshot_tests {
|
||||
};
|
||||
}
|
||||
|
||||
snapshot_test!(
|
||||
a,
|
||||
r#"boxSketch = startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line([0, 10], %)
|
||||
|> tangentialArc([-5, 5], %)
|
||||
|> line([5, -15], %)
|
||||
|> extrude(length=10)
|
||||
"#
|
||||
);
|
||||
snapshot_test!(b, "myVar = min(5 , -legLen(5, 4))"); // Space before comma
|
||||
|
||||
snapshot_test!(c, "myVar = min(-legLen(5, 4), 5)");
|
||||
snapshot_test!(d, "myVar = 5 + 6 |> myFunc(45, %)");
|
||||
snapshot_test!(b, "myVar = min(x = 5 , y = 3)"); // Space before comma
|
||||
snapshot_test!(c, "myVar = min(x = -legLen(hyp = 5, pot = 4), y = 5)");
|
||||
snapshot_test!(d, "myVar = 5 + 6 |> myFunc(45, y = %)");
|
||||
snapshot_test!(e, "let x = 1 * (3 - 4)");
|
||||
snapshot_test!(f, r#"x = 1 // this is an inline comment"#);
|
||||
snapshot_test!(
|
||||
@ -5251,11 +5228,11 @@ mod snapshot_tests {
|
||||
snapshot_test!(v, r#"pt1 = b1[0]"#);
|
||||
snapshot_test!(w, r#"pt1 = b1['zero']"#);
|
||||
snapshot_test!(x, r#"pt1 = b1.zero"#);
|
||||
snapshot_test!(y, r#"sg = startSketchOn(XY) |> startProfileAt(pos, %)"#);
|
||||
snapshot_test!(y, r#"sg = startSketchOn(XY) |> startProfile(at = pos)"#);
|
||||
snapshot_test!(
|
||||
z,
|
||||
"sg = startSketchOn(XY)
|
||||
|> startProfileAt(pos) |> line([0, -scale], %)"
|
||||
|> startProfile(at = pos) |> line([0, -scale])"
|
||||
);
|
||||
snapshot_test!(aa, r#"sg = -scale"#);
|
||||
snapshot_test!(ab, "line(endAbsolute = [0, -1])");
|
||||
@ -5278,7 +5255,7 @@ mod snapshot_tests {
|
||||
snapshot_test!(
|
||||
af,
|
||||
r#"mySketch = startSketchOn(XY)
|
||||
|> startProfileAt([0,0], %)
|
||||
|> startProfile(%,at=[0,0])
|
||||
|> line(endAbsolute = [0, 1], tag = $myPath)
|
||||
|> line(endAbsolute = [1, 1])
|
||||
|> line(endAbsolute = [1, 0], tag = $rightPath)
|
||||
@ -5286,21 +5263,21 @@ mod snapshot_tests {
|
||||
);
|
||||
snapshot_test!(
|
||||
ag,
|
||||
"mySketch = startSketchOn(XY) |> startProfileAt([0,0], %) |> line(endAbsolute = [1, 1]) |> close()"
|
||||
"mySketch = startSketchOn(XY) |> startProfile(at=[0,0]) |> line(endAbsolute = [1, 1]) |> close()"
|
||||
);
|
||||
snapshot_test!(ah, "myBox = startSketchOn(XY) |> startProfileAt(p, %)");
|
||||
snapshot_test!(ai, r#"myBox = f(1) |> g(2, %)"#);
|
||||
snapshot_test!(ah, "myBox = startSketchOn(XY) |> startProfileAt(p)");
|
||||
snapshot_test!(ai, r#"myBox = f(1) |> g(2, arg=%)"#);
|
||||
snapshot_test!(
|
||||
aj,
|
||||
r#"myBox = startSketchOn(XY) |> startProfileAt(p, %) |> line(end = [0, l])"#
|
||||
r#"myBox = startSketchOn(XY) |> startProfile(%, at=p) |> line(end = [0, l])"#
|
||||
);
|
||||
snapshot_test!(ak, "line(endAbsolute = [0, 1])");
|
||||
snapshot_test!(ap, "mySketch = startSketchOn(XY) |> startProfileAt([0,0], %)");
|
||||
snapshot_test!(aq, "log(5, \"hello\", aIdentifier)");
|
||||
snapshot_test!(ap, "mySketch = startSketchOn(XY) |> startProfile(at = [0,0])");
|
||||
snapshot_test!(aq, "log(5, arg=\"hello\", arg2=aIdentifier)");
|
||||
snapshot_test!(ar, r#"5 + "a""#);
|
||||
snapshot_test!(at, "line([0, l], %)");
|
||||
snapshot_test!(at, "line(%, end = [0, l])");
|
||||
snapshot_test!(au, include_str!("../../e2e/executor/inputs/cylinder.kcl"));
|
||||
snapshot_test!(av, "fn f = (angle?) => { return default(angle, 360) }");
|
||||
snapshot_test!(av, "fn f = (angle?) => { return default(ifNone=360, otherwise=360) }");
|
||||
snapshot_test!(
|
||||
aw,
|
||||
"let numbers = [
|
||||
@ -5400,6 +5377,8 @@ my14 = 4 ^ 2 - 3 ^ 2 * 2
|
||||
)"#
|
||||
);
|
||||
snapshot_test!(kw_function_in_binary_op, r#"val = f(x = 1) + 1"#);
|
||||
snapshot_test!(kw_function_args_zero, r#"val = f()"#);
|
||||
snapshot_test!(kw_function_args_one, r#"val = f(3)"#);
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
|
@ -63,7 +63,6 @@ expression: actual
|
||||
"commentStart": 62,
|
||||
"end": 80,
|
||||
"expression": {
|
||||
"arguments": [],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 62,
|
||||
@ -82,8 +81,9 @@ expression: actual
|
||||
"commentStart": 62,
|
||||
"end": 80,
|
||||
"start": 62,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
"start": 62,
|
||||
"type": "ExpressionStatement",
|
||||
|
@ -71,17 +71,6 @@ expression: actual
|
||||
"commentStart": 54,
|
||||
"end": 66,
|
||||
"expression": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 60,
|
||||
"end": 65,
|
||||
"raw": "false",
|
||||
"start": 60,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": false
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 54,
|
||||
@ -100,8 +89,17 @@ expression: actual
|
||||
"commentStart": 54,
|
||||
"end": 66,
|
||||
"start": 54,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 60,
|
||||
"end": 65,
|
||||
"raw": "false",
|
||||
"start": 60,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": false
|
||||
}
|
||||
},
|
||||
"start": 54,
|
||||
"type": "ExpressionStatement",
|
||||
|
@ -19,24 +19,6 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": {
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": "XY",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 25,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 11,
|
||||
@ -55,60 +37,79 @@ expression: actual
|
||||
"commentStart": 11,
|
||||
"end": 28,
|
||||
"start": 11,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": {
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": "XY",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 25,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 55,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 56,
|
||||
"end": 57,
|
||||
"raw": "0",
|
||||
"start": 56,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 55,
|
||||
"end": 57,
|
||||
"name": "at",
|
||||
"start": 55,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 58,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 59,
|
||||
"end": 60,
|
||||
"raw": "0",
|
||||
"start": 59,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 61,
|
||||
"end": 62,
|
||||
"raw": "0",
|
||||
"start": 61,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 58,
|
||||
"end": 59,
|
||||
"raw": "0",
|
||||
"start": 58,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 60,
|
||||
"start": 55,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 62,
|
||||
"end": 63,
|
||||
"start": 62,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
],
|
||||
"end": 63,
|
||||
"start": 58,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 40,
|
||||
"end": 54,
|
||||
"end": 52,
|
||||
"name": {
|
||||
"commentStart": 40,
|
||||
"end": 54,
|
||||
"name": "startProfileAt",
|
||||
"end": 52,
|
||||
"name": "startProfile",
|
||||
"start": 40,
|
||||
"type": "Identifier"
|
||||
},
|
||||
@ -119,8 +120,15 @@ expression: actual
|
||||
"commentStart": 40,
|
||||
"end": 64,
|
||||
"start": 40,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 53,
|
||||
"end": 54,
|
||||
"start": 53,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
@ -363,7 +371,6 @@ expression: actual
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 223,
|
||||
@ -382,8 +389,9 @@ expression: actual
|
||||
"commentStart": 223,
|
||||
"end": 230,
|
||||
"start": 223,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 11,
|
||||
|
@ -8,7 +8,7 @@ expression: actual
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 97,
|
||||
"end": 95,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 8,
|
||||
@ -19,24 +19,6 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": {
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": "XY",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 25,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 11,
|
||||
@ -55,60 +37,79 @@ expression: actual
|
||||
"commentStart": 11,
|
||||
"end": 28,
|
||||
"start": 11,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": {
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": "XY",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 25,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 47,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 48,
|
||||
"end": 49,
|
||||
"raw": "0",
|
||||
"start": 48,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 45,
|
||||
"end": 47,
|
||||
"name": "at",
|
||||
"start": 45,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 48,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 49,
|
||||
"end": 50,
|
||||
"raw": "0",
|
||||
"start": 49,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 51,
|
||||
"end": 52,
|
||||
"raw": "0",
|
||||
"start": 51,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 50,
|
||||
"end": 51,
|
||||
"raw": "0",
|
||||
"start": 50,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 52,
|
||||
"start": 47,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 54,
|
||||
"end": 55,
|
||||
"start": 54,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
],
|
||||
"end": 53,
|
||||
"start": 48,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 32,
|
||||
"end": 46,
|
||||
"end": 44,
|
||||
"name": {
|
||||
"commentStart": 32,
|
||||
"end": 46,
|
||||
"name": "startProfileAt",
|
||||
"end": 44,
|
||||
"name": "startProfile",
|
||||
"start": 32,
|
||||
"type": "Identifier"
|
||||
},
|
||||
@ -117,30 +118,31 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 32,
|
||||
"end": 56,
|
||||
"end": 54,
|
||||
"start": 32,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 65,
|
||||
"end": 76,
|
||||
"commentStart": 63,
|
||||
"end": 74,
|
||||
"name": "endAbsolute",
|
||||
"start": 65,
|
||||
"start": 63,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 79,
|
||||
"commentStart": 77,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 80,
|
||||
"end": 81,
|
||||
"commentStart": 78,
|
||||
"end": 79,
|
||||
"raw": "1",
|
||||
"start": 80,
|
||||
"start": 78,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -149,10 +151,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 83,
|
||||
"end": 84,
|
||||
"commentStart": 81,
|
||||
"end": 82,
|
||||
"raw": "1",
|
||||
"start": 83,
|
||||
"start": 81,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -161,8 +163,8 @@ expression: actual
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 85,
|
||||
"start": 79,
|
||||
"end": 83,
|
||||
"start": 77,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
@ -170,52 +172,52 @@ expression: actual
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 60,
|
||||
"end": 64,
|
||||
"commentStart": 58,
|
||||
"end": 62,
|
||||
"name": {
|
||||
"commentStart": 60,
|
||||
"end": 64,
|
||||
"commentStart": 58,
|
||||
"end": 62,
|
||||
"name": "line",
|
||||
"start": 60,
|
||||
"start": 58,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 60,
|
||||
"start": 58,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 60,
|
||||
"end": 86,
|
||||
"start": 60,
|
||||
"commentStart": 58,
|
||||
"end": 84,
|
||||
"start": 58,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 90,
|
||||
"end": 95,
|
||||
"commentStart": 88,
|
||||
"end": 93,
|
||||
"name": {
|
||||
"commentStart": 90,
|
||||
"end": 95,
|
||||
"commentStart": 88,
|
||||
"end": 93,
|
||||
"name": "close",
|
||||
"start": 90,
|
||||
"start": 88,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 90,
|
||||
"start": 88,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 90,
|
||||
"end": 97,
|
||||
"start": 90,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"commentStart": 88,
|
||||
"end": 95,
|
||||
"start": 88,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 11,
|
||||
"end": 97,
|
||||
"end": 95,
|
||||
"start": 11,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
@ -223,7 +225,7 @@ expression: actual
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 97,
|
||||
"end": 95,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -231,6 +233,6 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 97,
|
||||
"end": 95,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ expression: actual
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 49,
|
||||
"end": 46,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
@ -19,24 +19,6 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 22,
|
||||
"end": 24,
|
||||
"name": {
|
||||
"commentStart": 22,
|
||||
"end": 24,
|
||||
"name": "XY",
|
||||
"start": 22,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 22,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 8,
|
||||
@ -55,35 +37,26 @@ expression: actual
|
||||
"commentStart": 8,
|
||||
"end": 25,
|
||||
"start": 8,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 22,
|
||||
"end": 24,
|
||||
"name": {
|
||||
"commentStart": 22,
|
||||
"end": 24,
|
||||
"name": "XY",
|
||||
"start": 22,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 22,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 44,
|
||||
"end": 45,
|
||||
"name": {
|
||||
"commentStart": 44,
|
||||
"end": 45,
|
||||
"name": "p",
|
||||
"start": 44,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 44,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
},
|
||||
{
|
||||
"commentStart": 47,
|
||||
"end": 48,
|
||||
"start": 47,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 29,
|
||||
@ -100,14 +73,30 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 29,
|
||||
"end": 49,
|
||||
"end": 46,
|
||||
"start": 29,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 44,
|
||||
"end": 45,
|
||||
"name": {
|
||||
"commentStart": 44,
|
||||
"end": 45,
|
||||
"name": "p",
|
||||
"start": 44,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 44,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
}
|
||||
],
|
||||
"commentStart": 8,
|
||||
"end": 49,
|
||||
"end": 46,
|
||||
"start": 8,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
@ -115,7 +104,7 @@ expression: actual
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 49,
|
||||
"end": 46,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -123,6 +112,6 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 49,
|
||||
"end": 46,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ expression: actual
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 23,
|
||||
"end": 27,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
@ -19,20 +19,6 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 10,
|
||||
"end": 11,
|
||||
"raw": "1",
|
||||
"start": 10,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 1.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 8,
|
||||
@ -51,29 +37,39 @@ expression: actual
|
||||
"commentStart": 8,
|
||||
"end": 12,
|
||||
"start": 8,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 10,
|
||||
"end": 11,
|
||||
"raw": "1",
|
||||
"start": 10,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 1.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 18,
|
||||
"end": 19,
|
||||
"raw": "2",
|
||||
"start": 18,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 2.0,
|
||||
"suffix": "None"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 21,
|
||||
"end": 24,
|
||||
"name": "arg",
|
||||
"start": 21,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 25,
|
||||
"end": 26,
|
||||
"start": 25,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 21,
|
||||
"end": 22,
|
||||
"start": 21,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
@ -92,14 +88,26 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 16,
|
||||
"end": 23,
|
||||
"end": 27,
|
||||
"start": 16,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 18,
|
||||
"end": 19,
|
||||
"raw": "2",
|
||||
"start": 18,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 2.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"commentStart": 8,
|
||||
"end": 23,
|
||||
"end": 27,
|
||||
"start": 8,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
@ -107,7 +115,7 @@ expression: actual
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 23,
|
||||
"end": 27,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -115,6 +123,6 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 23,
|
||||
"end": 27,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ expression: actual
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 71,
|
||||
"end": 72,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
@ -19,24 +19,6 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 22,
|
||||
"end": 24,
|
||||
"name": {
|
||||
"commentStart": 22,
|
||||
"end": 24,
|
||||
"name": "XY",
|
||||
"start": 22,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 22,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 8,
|
||||
@ -55,43 +37,62 @@ expression: actual
|
||||
"commentStart": 8,
|
||||
"end": 25,
|
||||
"start": 8,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 22,
|
||||
"end": 24,
|
||||
"name": {
|
||||
"commentStart": 22,
|
||||
"end": 24,
|
||||
"name": "XY",
|
||||
"start": 22,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 22,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 44,
|
||||
"end": 45,
|
||||
"name": {
|
||||
"commentStart": 44,
|
||||
"end": 45,
|
||||
"name": "p",
|
||||
"start": 44,
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 45,
|
||||
"end": 47,
|
||||
"name": "at",
|
||||
"start": 45,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 44,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
},
|
||||
{
|
||||
"commentStart": 47,
|
||||
"end": 48,
|
||||
"start": 47,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
"arg": {
|
||||
"abs_path": false,
|
||||
"commentStart": 48,
|
||||
"end": 49,
|
||||
"name": {
|
||||
"commentStart": 48,
|
||||
"end": 49,
|
||||
"name": "p",
|
||||
"start": 48,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 48,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 29,
|
||||
"end": 43,
|
||||
"end": 41,
|
||||
"name": {
|
||||
"commentStart": 29,
|
||||
"end": 43,
|
||||
"name": "startProfileAt",
|
||||
"end": 41,
|
||||
"name": "startProfile",
|
||||
"start": 29,
|
||||
"type": "Identifier"
|
||||
},
|
||||
@ -100,30 +101,37 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 29,
|
||||
"end": 49,
|
||||
"end": 50,
|
||||
"start": 29,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 42,
|
||||
"end": 43,
|
||||
"start": 42,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 58,
|
||||
"end": 61,
|
||||
"commentStart": 59,
|
||||
"end": 62,
|
||||
"name": "end",
|
||||
"start": 58,
|
||||
"start": 59,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 64,
|
||||
"commentStart": 65,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 65,
|
||||
"end": 66,
|
||||
"commentStart": 66,
|
||||
"end": 67,
|
||||
"raw": "0",
|
||||
"start": 65,
|
||||
"start": 66,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -133,23 +141,23 @@ expression: actual
|
||||
},
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 68,
|
||||
"end": 69,
|
||||
"commentStart": 69,
|
||||
"end": 70,
|
||||
"name": {
|
||||
"commentStart": 68,
|
||||
"end": 69,
|
||||
"commentStart": 69,
|
||||
"end": 70,
|
||||
"name": "l",
|
||||
"start": 68,
|
||||
"start": 69,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 68,
|
||||
"start": 69,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"end": 70,
|
||||
"start": 64,
|
||||
"end": 71,
|
||||
"start": 65,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
@ -157,29 +165,29 @@ expression: actual
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 53,
|
||||
"end": 57,
|
||||
"commentStart": 54,
|
||||
"end": 58,
|
||||
"name": {
|
||||
"commentStart": 53,
|
||||
"end": 57,
|
||||
"commentStart": 54,
|
||||
"end": 58,
|
||||
"name": "line",
|
||||
"start": 53,
|
||||
"start": 54,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 53,
|
||||
"start": 54,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 53,
|
||||
"end": 71,
|
||||
"start": 53,
|
||||
"commentStart": 54,
|
||||
"end": 72,
|
||||
"start": 54,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 8,
|
||||
"end": 71,
|
||||
"end": 72,
|
||||
"start": 8,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
@ -187,7 +195,7 @@ expression: actual
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 71,
|
||||
"end": 72,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -195,6 +203,6 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 71,
|
||||
"end": 72,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -19,24 +19,6 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": {
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": "XY",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 25,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 11,
|
||||
@ -55,60 +37,79 @@ expression: actual
|
||||
"commentStart": 11,
|
||||
"end": 28,
|
||||
"start": 11,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": {
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": "XY",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 25,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 47,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 48,
|
||||
"end": 49,
|
||||
"raw": "0",
|
||||
"start": 48,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 45,
|
||||
"end": 47,
|
||||
"name": "at",
|
||||
"start": 45,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 50,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 51,
|
||||
"end": 52,
|
||||
"raw": "0",
|
||||
"start": 51,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 53,
|
||||
"end": 54,
|
||||
"raw": "0",
|
||||
"start": 53,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 50,
|
||||
"end": 51,
|
||||
"raw": "0",
|
||||
"start": 50,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 52,
|
||||
"start": 47,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 54,
|
||||
"end": 55,
|
||||
"start": 54,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
],
|
||||
"end": 55,
|
||||
"start": 50,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 32,
|
||||
"end": 46,
|
||||
"end": 44,
|
||||
"name": {
|
||||
"commentStart": 32,
|
||||
"end": 46,
|
||||
"name": "startProfileAt",
|
||||
"end": 44,
|
||||
"name": "startProfile",
|
||||
"start": 32,
|
||||
"type": "Identifier"
|
||||
},
|
||||
@ -119,8 +120,9 @@ expression: actual
|
||||
"commentStart": 32,
|
||||
"end": 56,
|
||||
"start": 32,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 11,
|
||||
|
@ -6,45 +6,53 @@ expression: actual
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 28,
|
||||
"end": 37,
|
||||
"expression": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 4,
|
||||
"end": 5,
|
||||
"raw": "5",
|
||||
"start": 4,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 7,
|
||||
"end": 10,
|
||||
"name": "arg",
|
||||
"start": 7,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 11,
|
||||
"end": 18,
|
||||
"raw": "\"hello\"",
|
||||
"start": 11,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "hello"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 7,
|
||||
"end": 14,
|
||||
"raw": "\"hello\"",
|
||||
"start": 7,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "hello"
|
||||
},
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 16,
|
||||
"end": 27,
|
||||
"name": {
|
||||
"commentStart": 16,
|
||||
"end": 27,
|
||||
"name": "aIdentifier",
|
||||
"start": 16,
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 20,
|
||||
"end": 24,
|
||||
"name": "arg2",
|
||||
"start": 20,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 16,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
"arg": {
|
||||
"abs_path": false,
|
||||
"commentStart": 25,
|
||||
"end": 36,
|
||||
"name": {
|
||||
"commentStart": 25,
|
||||
"end": 36,
|
||||
"name": "aIdentifier",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 25,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
@ -63,10 +71,22 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 28,
|
||||
"end": 37,
|
||||
"start": 0,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 4,
|
||||
"end": 5,
|
||||
"raw": "5",
|
||||
"start": 4,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
"start": 0,
|
||||
"type": "ExpressionStatement",
|
||||
@ -74,6 +94,6 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 28,
|
||||
"end": 37,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -6,52 +6,55 @@ expression: actual
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 15,
|
||||
"end": 21,
|
||||
"expression": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 5,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"raw": "0",
|
||||
"start": 6,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 9,
|
||||
"end": 10,
|
||||
"name": {
|
||||
"commentStart": 9,
|
||||
"end": 10,
|
||||
"name": "l",
|
||||
"start": 9,
|
||||
"type": "Identifier"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 8,
|
||||
"end": 11,
|
||||
"name": "end",
|
||||
"start": 8,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 14,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 15,
|
||||
"end": 16,
|
||||
"raw": "0",
|
||||
"start": 15,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"path": [],
|
||||
"start": 9,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"end": 11,
|
||||
"start": 5,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 13,
|
||||
"end": 14,
|
||||
"start": 13,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 18,
|
||||
"end": 19,
|
||||
"name": {
|
||||
"commentStart": 18,
|
||||
"end": 19,
|
||||
"name": "l",
|
||||
"start": 18,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 18,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"end": 20,
|
||||
"start": 14,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
@ -70,10 +73,17 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 15,
|
||||
"end": 21,
|
||||
"start": 0,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 5,
|
||||
"end": 6,
|
||||
"start": 5,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
},
|
||||
"start": 0,
|
||||
"type": "ExpressionStatement",
|
||||
@ -81,6 +91,6 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 15,
|
||||
"end": 21,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -19,24 +19,6 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 31,
|
||||
"end": 33,
|
||||
"name": {
|
||||
"commentStart": 31,
|
||||
"end": 33,
|
||||
"name": "XY",
|
||||
"start": 31,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 31,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 17,
|
||||
@ -55,8 +37,24 @@ expression: actual
|
||||
"commentStart": 17,
|
||||
"end": 34,
|
||||
"start": 17,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 31,
|
||||
"end": 33,
|
||||
"name": {
|
||||
"commentStart": 31,
|
||||
"end": 33,
|
||||
"name": "XY",
|
||||
"start": 31,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 31,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
|
@ -8,7 +8,7 @@ expression: actual
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 3,
|
||||
"end": 49,
|
||||
"end": 64,
|
||||
"id": {
|
||||
"commentStart": 3,
|
||||
"end": 4,
|
||||
@ -23,31 +23,47 @@ expression: actual
|
||||
"argument": {
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 36,
|
||||
"end": 41,
|
||||
"name": {
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 36,
|
||||
"end": 41,
|
||||
"name": "angle",
|
||||
"end": 42,
|
||||
"name": "ifNone",
|
||||
"start": 36,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 36,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
"arg": {
|
||||
"commentStart": 43,
|
||||
"end": 46,
|
||||
"raw": "360",
|
||||
"start": 43,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 360.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 43,
|
||||
"end": 46,
|
||||
"raw": "360",
|
||||
"start": 43,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 360.0,
|
||||
"suffix": "None"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 48,
|
||||
"end": 57,
|
||||
"name": "otherwise",
|
||||
"start": 48,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 58,
|
||||
"end": 61,
|
||||
"raw": "360",
|
||||
"start": 58,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 360.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -67,24 +83,25 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 28,
|
||||
"end": 47,
|
||||
"end": 62,
|
||||
"start": 28,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
"commentStart": 21,
|
||||
"end": 47,
|
||||
"end": 62,
|
||||
"start": 21,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 19,
|
||||
"end": 49,
|
||||
"end": 64,
|
||||
"start": 19
|
||||
},
|
||||
"commentStart": 7,
|
||||
"end": 49,
|
||||
"end": 64,
|
||||
"params": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
@ -109,7 +126,7 @@ expression: actual
|
||||
"start": 3,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 49,
|
||||
"end": 64,
|
||||
"kind": "fn",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -117,6 +134,6 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 49,
|
||||
"end": 64,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ expression: actual
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 30,
|
||||
"end": 26,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
@ -19,72 +19,48 @@ expression: actual
|
||||
"init": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 12,
|
||||
"end": 13,
|
||||
"raw": "5",
|
||||
"start": 12,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 12,
|
||||
"end": 13,
|
||||
"name": "x",
|
||||
"start": 12,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 16,
|
||||
"end": 17,
|
||||
"raw": "5",
|
||||
"start": 16,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 24,
|
||||
"end": 25,
|
||||
"raw": "5",
|
||||
"start": 24,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 27,
|
||||
"end": 28,
|
||||
"raw": "4",
|
||||
"start": 27,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 4.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 17,
|
||||
"end": 23,
|
||||
"name": {
|
||||
"commentStart": 17,
|
||||
"end": 23,
|
||||
"name": "legLen",
|
||||
"start": 17,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 17,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 17,
|
||||
"end": 29,
|
||||
"start": 17,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 20,
|
||||
"end": 21,
|
||||
"name": "y",
|
||||
"start": 20,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 16,
|
||||
"end": 29,
|
||||
"operator": "-",
|
||||
"start": 16,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
"arg": {
|
||||
"commentStart": 24,
|
||||
"end": 25,
|
||||
"raw": "3",
|
||||
"start": 24,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 3.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
@ -103,15 +79,16 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 8,
|
||||
"end": 30,
|
||||
"end": 26,
|
||||
"start": 8,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 30,
|
||||
"end": 26,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -119,6 +96,6 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 30,
|
||||
"end": 26,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -32,24 +32,6 @@ expression: actual
|
||||
{
|
||||
"commentStart": 38,
|
||||
"cond": {
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 51,
|
||||
"end": 57,
|
||||
"name": {
|
||||
"commentStart": 51,
|
||||
"end": 57,
|
||||
"name": "radius",
|
||||
"start": 51,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 51,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 46,
|
||||
@ -68,8 +50,24 @@ expression: actual
|
||||
"commentStart": 46,
|
||||
"end": 58,
|
||||
"start": 46,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 51,
|
||||
"end": 57,
|
||||
"name": {
|
||||
"commentStart": 51,
|
||||
"end": 57,
|
||||
"name": "radius",
|
||||
"start": 51,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 51,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
"digest": null,
|
||||
"end": 84,
|
||||
|
@ -8,7 +8,7 @@ expression: actual
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 29,
|
||||
"end": 49,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
@ -19,71 +19,112 @@ expression: actual
|
||||
"init": {
|
||||
"arguments": [
|
||||
{
|
||||
"argument": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 20,
|
||||
"end": 21,
|
||||
"raw": "5",
|
||||
"start": 20,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 23,
|
||||
"end": 24,
|
||||
"raw": "4",
|
||||
"start": 23,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 4.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 13,
|
||||
"end": 19,
|
||||
"name": {
|
||||
"commentStart": 13,
|
||||
"end": 19,
|
||||
"name": "legLen",
|
||||
"start": 13,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 13,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 13,
|
||||
"end": 25,
|
||||
"start": 13,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 12,
|
||||
"end": 13,
|
||||
"name": "x",
|
||||
"start": 12,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 12,
|
||||
"end": 25,
|
||||
"operator": "-",
|
||||
"start": 12,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
"arg": {
|
||||
"argument": {
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 24,
|
||||
"end": 27,
|
||||
"name": "hyp",
|
||||
"start": 24,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 30,
|
||||
"end": 31,
|
||||
"raw": "5",
|
||||
"start": 30,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 33,
|
||||
"end": 36,
|
||||
"name": "pot",
|
||||
"start": 33,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 39,
|
||||
"end": 40,
|
||||
"raw": "4",
|
||||
"start": 39,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 4.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 17,
|
||||
"end": 23,
|
||||
"name": {
|
||||
"commentStart": 17,
|
||||
"end": 23,
|
||||
"name": "legLen",
|
||||
"start": 17,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 17,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 17,
|
||||
"end": 41,
|
||||
"start": 17,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
"commentStart": 16,
|
||||
"end": 41,
|
||||
"operator": "-",
|
||||
"start": 16,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 27,
|
||||
"end": 28,
|
||||
"raw": "5",
|
||||
"start": 27,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 43,
|
||||
"end": 44,
|
||||
"name": "y",
|
||||
"start": 43,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 47,
|
||||
"end": 48,
|
||||
"raw": "5",
|
||||
"start": 47,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -103,15 +144,16 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 8,
|
||||
"end": 29,
|
||||
"end": 49,
|
||||
"start": 8,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 29,
|
||||
"end": 49,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -119,6 +161,6 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 29,
|
||||
"end": 49,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ expression: actual
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 30,
|
||||
"end": 34,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
@ -53,23 +53,21 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 24,
|
||||
"end": 26,
|
||||
"raw": "45",
|
||||
"start": 24,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 45.0,
|
||||
"suffix": "None"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 28,
|
||||
"end": 29,
|
||||
"name": "y",
|
||||
"start": 28,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 32,
|
||||
"end": 33,
|
||||
"start": 32,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 28,
|
||||
"end": 29,
|
||||
"start": 28,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
@ -88,14 +86,26 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 17,
|
||||
"end": 30,
|
||||
"end": 34,
|
||||
"start": 17,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 24,
|
||||
"end": 26,
|
||||
"raw": "45",
|
||||
"start": 24,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 45.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"commentStart": 8,
|
||||
"end": 30,
|
||||
"end": 34,
|
||||
"start": 8,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
@ -103,7 +113,7 @@ expression: actual
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 30,
|
||||
"end": 34,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -111,6 +121,6 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 30,
|
||||
"end": 34,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -0,0 +1,66 @@
|
||||
---
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 10,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "val",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"name": {
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"name": "f",
|
||||
"start": 6,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 6,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 10,
|
||||
"start": 6,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"raw": "3",
|
||||
"start": 8,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 3.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 10,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 10,
|
||||
"start": 0
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
---
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 9,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "val",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"name": {
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"name": "f",
|
||||
"start": 6,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 6,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 9,
|
||||
"start": 6,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 9,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 9,
|
||||
"start": 0
|
||||
}
|
@ -19,24 +19,6 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 19,
|
||||
"end": 21,
|
||||
"name": {
|
||||
"commentStart": 19,
|
||||
"end": 21,
|
||||
"name": "XY",
|
||||
"start": 19,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 19,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 5,
|
||||
@ -55,43 +37,62 @@ expression: actual
|
||||
"commentStart": 5,
|
||||
"end": 22,
|
||||
"start": 5,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 19,
|
||||
"end": 21,
|
||||
"name": {
|
||||
"commentStart": 19,
|
||||
"end": 21,
|
||||
"name": "XY",
|
||||
"start": 19,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 19,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 41,
|
||||
"end": 44,
|
||||
"name": {
|
||||
"commentStart": 41,
|
||||
"end": 44,
|
||||
"name": "pos",
|
||||
"start": 41,
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 39,
|
||||
"end": 41,
|
||||
"name": "at",
|
||||
"start": 39,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 41,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
},
|
||||
{
|
||||
"commentStart": 46,
|
||||
"end": 47,
|
||||
"start": 46,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
"arg": {
|
||||
"abs_path": false,
|
||||
"commentStart": 44,
|
||||
"end": 47,
|
||||
"name": {
|
||||
"commentStart": 44,
|
||||
"end": 47,
|
||||
"name": "pos",
|
||||
"start": 44,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 44,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 26,
|
||||
"end": 40,
|
||||
"end": 38,
|
||||
"name": {
|
||||
"commentStart": 26,
|
||||
"end": 40,
|
||||
"name": "startProfileAt",
|
||||
"end": 38,
|
||||
"name": "startProfile",
|
||||
"start": 26,
|
||||
"type": "Identifier"
|
||||
},
|
||||
@ -102,8 +103,9 @@ expression: actual
|
||||
"commentStart": 26,
|
||||
"end": 48,
|
||||
"start": 26,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 5,
|
||||
|
@ -19,24 +19,6 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 19,
|
||||
"end": 21,
|
||||
"name": {
|
||||
"commentStart": 19,
|
||||
"end": 21,
|
||||
"name": "XY",
|
||||
"start": 19,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 19,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 5,
|
||||
@ -55,36 +37,62 @@ expression: actual
|
||||
"commentStart": 5,
|
||||
"end": 22,
|
||||
"start": 5,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 19,
|
||||
"end": 21,
|
||||
"name": {
|
||||
"commentStart": 19,
|
||||
"end": 21,
|
||||
"name": "XY",
|
||||
"start": 19,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 19,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 45,
|
||||
"end": 48,
|
||||
"name": {
|
||||
"commentStart": 45,
|
||||
"end": 48,
|
||||
"name": "pos",
|
||||
"start": 45,
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 43,
|
||||
"end": 45,
|
||||
"name": "at",
|
||||
"start": 43,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 45,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
"arg": {
|
||||
"abs_path": false,
|
||||
"commentStart": 48,
|
||||
"end": 51,
|
||||
"name": {
|
||||
"commentStart": 48,
|
||||
"end": 51,
|
||||
"name": "pos",
|
||||
"start": 48,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 48,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 30,
|
||||
"end": 44,
|
||||
"end": 42,
|
||||
"name": {
|
||||
"commentStart": 30,
|
||||
"end": 44,
|
||||
"name": "startProfileAt",
|
||||
"end": 42,
|
||||
"name": "startProfile",
|
||||
"start": 30,
|
||||
"type": "Identifier"
|
||||
},
|
||||
@ -93,86 +101,78 @@ expression: actual
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 30,
|
||||
"end": 49,
|
||||
"end": 52,
|
||||
"start": 30,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 58,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 59,
|
||||
"end": 60,
|
||||
"raw": "0",
|
||||
"start": 59,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"abs_path": false,
|
||||
"commentStart": 63,
|
||||
"end": 68,
|
||||
"name": {
|
||||
"commentStart": 63,
|
||||
"end": 68,
|
||||
"name": "scale",
|
||||
"start": 63,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 63,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 62,
|
||||
"end": 68,
|
||||
"operator": "-",
|
||||
"start": 62,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
],
|
||||
"end": 69,
|
||||
"start": 58,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 71,
|
||||
"end": 72,
|
||||
"start": 71,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 53,
|
||||
"end": 57,
|
||||
"commentStart": 56,
|
||||
"end": 60,
|
||||
"name": {
|
||||
"commentStart": 53,
|
||||
"end": 57,
|
||||
"commentStart": 56,
|
||||
"end": 60,
|
||||
"name": "line",
|
||||
"start": 53,
|
||||
"start": 56,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 53,
|
||||
"start": 56,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 53,
|
||||
"commentStart": 56,
|
||||
"end": 73,
|
||||
"start": 53,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"start": 56,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 61,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 62,
|
||||
"end": 63,
|
||||
"raw": "0",
|
||||
"start": 62,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"abs_path": false,
|
||||
"commentStart": 66,
|
||||
"end": 71,
|
||||
"name": {
|
||||
"commentStart": 66,
|
||||
"end": 71,
|
||||
"name": "scale",
|
||||
"start": 66,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 66,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 65,
|
||||
"end": 71,
|
||||
"operator": "-",
|
||||
"start": 65,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
],
|
||||
"end": 72,
|
||||
"start": 61,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"commentStart": 5,
|
||||
|
Reference in New Issue
Block a user