Remove deprecated syntax (#6561)

* Remove deprecated syntax

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* fix one test

* fix sketch on revolved face test

* fix test: empty-scene default-planes act as expected

* fix up more tests

* another fix

* remove another const

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
This commit is contained in:
Nick Cameron
2025-04-30 13:12:40 +12:00
committed by GitHub
parent 29b8a442c2
commit 0ea0d1703e
127 changed files with 2092 additions and 2359 deletions

View File

@ -3623,7 +3623,7 @@ mod tests {
#[test]
fn test_get_lsp_folding_ranges() {
let code = r#"const part001 = startSketchOn(XY)
let code = r#"part001 = startSketchOn(XY)
|> startProfile(at = [0.0000000000, 5.0000000000])
|> line([0.4900857016, -0.0240763666], %)
@ -3631,13 +3631,13 @@ startSketchOn(XY)
|> startProfile(at = [0.0000000000, 5.0000000000])
|> line([0.4900857016, -0.0240763666], %)
const part002 = "part002"
const things = [part001, 0.0]
let blah = 1
const foo = false
let baz = {a: 1, b: "thing"}
part002 = "part002"
things = [part001, 0.0]
blah = 1
foo = false
baz = {a = 1, b = "thing"}
fn ghi = (x) => {
fn ghi(x) {
return x
}
@ -3647,32 +3647,32 @@ ghi("things")
let folding_ranges = program.get_lsp_folding_ranges();
assert_eq!(folding_ranges.len(), 3);
assert_eq!(folding_ranges[0].start_line, 27);
assert_eq!(folding_ranges[0].end_line, 132);
assert_eq!(folding_ranges[0].end_line, 126);
assert_eq!(
folding_ranges[0].collapsed_text,
Some("part001 = startSketchOn(XY)".to_string())
);
assert_eq!(folding_ranges[1].start_line, 151);
assert_eq!(folding_ranges[1].end_line, 250);
assert_eq!(folding_ranges[1].start_line, 145);
assert_eq!(folding_ranges[1].end_line, 244);
assert_eq!(folding_ranges[1].collapsed_text, Some("startSketchOn(XY)".to_string()));
assert_eq!(folding_ranges[2].start_line, 380);
assert_eq!(folding_ranges[2].end_line, 399);
assert_eq!(folding_ranges[2].start_line, 350);
assert_eq!(folding_ranges[2].end_line, 363);
assert_eq!(folding_ranges[2].collapsed_text, Some("fn ghi(x) {".to_string()));
}
#[test]
fn test_get_lsp_symbols() {
let code = r#"const part001 = startSketchOn('XY')
let code = r#"part001 = startSketchOn(XY)
|> startProfile(at = [0.0000000000, 5.0000000000])
|> line([0.4900857016, -0.0240763666], %)
const part002 = "part002"
const things = [part001, 0.0]
let blah = 1
const foo = false
let baz = {a: 1, b: "thing"}
part002 = "part002"
things = [part001, 0.0]
blah = 1
foo = false
baz = {a = 1, b = "thing"}
fn ghi = (x) => {
fn ghi(x) {
return x
}
"#;
@ -3684,58 +3684,59 @@ fn ghi = (x) => {
#[test]
fn test_ast_in_comment() {
let some_program_string = r#"r = 20 / pow(pi(), exp = 1 / 3)
const h = 30
h = 30
// st
const cylinder = startSketchOn('-XZ')
cylinder = startSketchOn(-XZ)
|> startProfile(at = [50, 0])
|> arc({
angle_end: 360,
angle_start: 0,
radius: r
angle_end = 360,
angle_start = 0,
radius = r
}, %)
|> extrude(h, %)
"#;
let program = crate::parsing::top_level_parse(some_program_string).unwrap();
assert!(program.in_comment(50));
assert!(program.in_comment(43));
}
#[test]
fn test_ast_in_comment_pipe() {
let some_program_string = r#"r = 20 / pow(pi(), exp = 1 / 3)
const h = 30
h = 30
// st
const cylinder = startSketchOn('-XZ')
cylinder = startSketchOn(-XZ)
|> startProfile(at = [50, 0])
// comment
|> arc({
angle_end: 360,
angle_start: 0,
radius: r
angle_end= 360,
angle_start= 0,
radius= r
}, %)
|> extrude(h, %)
"#;
let program = crate::parsing::top_level_parse(some_program_string).unwrap();
assert!(program.in_comment(124));
assert!(program.in_comment(117));
}
#[test]
fn test_ast_in_comment_inline() {
let some_program_string = r#"const part001 = startSketchOn('XY')
let some_program_string = r#"part001 = startSketchOn(XY)
|> startProfile(at = [0,0])
|> xLine(length = 5) // lin
"#;
let program = crate::parsing::top_level_parse(some_program_string).unwrap();
assert!(program.in_comment(92));
assert!(program.in_comment(85));
}
#[tokio::test(flavor = "multi_thread")]
async fn test_parse_type_args_on_functions() {
let some_program_string = r#"fn thing = (arg0: number(mm), arg1: string, tag?: string) => {
let some_program_string = r#"fn thing(arg0: number(mm), arg1: string, tag?: string) {
return arg0
}"#;
let program = crate::parsing::top_level_parse(some_program_string).unwrap();
@ -3766,7 +3767,7 @@ const cylinder = startSketchOn('-XZ')
#[tokio::test(flavor = "multi_thread")]
async fn test_parse_type_args_array_on_functions() {
let some_program_string = r#"fn thing = (arg0: [number], arg1: [string], tag?: string) => {
let some_program_string = r#"fn thing(arg0: [number], arg1: [string], tag?: string) {
return arg0
}"#;
let program = crate::parsing::top_level_parse(some_program_string).unwrap();
@ -3803,7 +3804,7 @@ const cylinder = startSketchOn('-XZ')
#[tokio::test(flavor = "multi_thread")]
async fn test_parse_type_args_object_on_functions() {
let some_program_string = r#"fn thing = (arg0: [number], arg1: {thing: number, things: [string], more?: string}, tag?: string) => {
let some_program_string = r#"fn thing(arg0: [number], arg1: {thing: number, things: [string], more?: string}, tag?: string) {
return arg0
}"#;
let module_id = ModuleId::default();
@ -3836,14 +3837,14 @@ const cylinder = startSketchOn('-XZ')
name: "thing".to_owned(),
digest: None,
},
35,
40,
32,
37,
module_id,
),
type_: Some(Node::new(
Type::Primitive(PrimitiveType::Number(NumericSuffix::None)),
42,
48,
39,
45,
module_id
)),
default_value: None,
@ -3856,8 +3857,8 @@ const cylinder = startSketchOn('-XZ')
name: "things".to_owned(),
digest: None,
},
50,
56,
47,
53,
module_id,
),
type_: Some(Node::new(
@ -3865,8 +3866,8 @@ const cylinder = startSketchOn('-XZ')
ty: Box::new(Type::Primitive(PrimitiveType::String)),
len: ArrayLen::None
},
59,
65,
56,
62,
module_id
)),
default_value: None,
@ -3879,11 +3880,11 @@ const cylinder = startSketchOn('-XZ')
name: "more".to_owned(),
digest: None
},
68,
72,
65,
69,
module_id,
),
type_: Some(Node::new(Type::Primitive(PrimitiveType::String), 75, 81, module_id)),
type_: Some(Node::new(Type::Primitive(PrimitiveType::String), 72, 78, module_id)),
labeled: true,
default_value: Some(DefaultParamVal::none()),
digest: None
@ -3897,91 +3898,6 @@ const cylinder = startSketchOn('-XZ')
);
}
#[tokio::test(flavor = "multi_thread")]
async fn test_parse_return_type_on_functions() {
let some_program_string = r#"fn thing(): {thing: number, things: [string], more?: string} {
return 1
}"#;
let module_id = ModuleId::default();
let program = crate::parsing::parse_str(some_program_string, module_id).unwrap();
// Check the program output for the types of the parameters.
let function = program.body.first().unwrap();
let BodyItem::VariableDeclaration(var_decl) = function else {
panic!("expected a variable declaration")
};
let Expr::FunctionExpression(ref func_expr) = var_decl.declaration.init else {
panic!("expected a function expression")
};
let params = &func_expr.params;
assert_eq!(params.len(), 0);
assert_eq!(
func_expr.return_type.as_ref().unwrap().inner,
Type::Object {
properties: vec![
Parameter {
identifier: Node::new(
Identifier {
name: "thing".to_owned(),
digest: None
},
13,
18,
module_id,
),
type_: Some(Node::new(
Type::Primitive(PrimitiveType::Number(NumericSuffix::None)),
20,
26,
module_id
)),
default_value: None,
labeled: true,
digest: None
},
Parameter {
identifier: Node::new(
Identifier {
name: "things".to_owned(),
digest: None
},
28,
34,
module_id,
),
type_: Some(Node::new(
Type::Array {
ty: Box::new(Type::Primitive(PrimitiveType::String)),
len: ArrayLen::None
},
37,
43,
module_id
)),
default_value: None,
labeled: true,
digest: None
},
Parameter {
identifier: Node::new(
Identifier {
name: "more".to_owned(),
digest: None
},
46,
50,
module_id,
),
type_: Some(Node::new(Type::Primitive(PrimitiveType::String), 53, 59, module_id)),
labeled: true,
default_value: Some(DefaultParamVal::none()),
digest: None
}
]
}
);
}
#[test]
fn required_params() {
for (i, (test_name, expected, function_expr)) in [

View File

@ -936,7 +936,7 @@ fn object_property(i: &mut TokenSlice) -> PResult<Node<ObjectProperty>> {
);
if sep.token_type == TokenType::Colon {
ParseContext::warn(
ParseContext::err(
CompilationError::err(
sep.into(),
"Using `:` to initialize objects is deprecated, prefer using `=`.",
@ -1221,20 +1221,10 @@ fn if_expr(i: &mut TokenSlice) -> PResult<BoxNode<IfExpression>> {
fn function_expr(i: &mut TokenSlice) -> PResult<Expr> {
let fn_tok = opt(fun).parse_next(i)?;
ignore_whitespace(i);
let (result, has_arrow) = function_decl.parse_next(i)?;
let result = function_decl.parse_next(i)?;
if fn_tok.is_none() {
if has_arrow {
ParseContext::warn(
CompilationError::err(
result.as_source_range().start_as_range(),
"Missing `fn` in function declaration",
)
.with_suggestion("Add `fn`", "fn", None, Tag::None),
);
} else {
let err = CompilationError::fatal(result.as_source_range(), "Anonymous function requires `fn` before `(`");
return Err(ErrMode::Cut(err.into()));
}
let err = CompilationError::fatal(result.as_source_range(), "Anonymous function requires `fn` before `(`");
return Err(ErrMode::Cut(err.into()));
}
Ok(Expr::FunctionExpression(Box::new(result)))
}
@ -1244,7 +1234,7 @@ fn function_expr(i: &mut TokenSlice) -> PResult<Expr> {
// const x = arg0 + arg1;
// return x
// }
fn function_decl(i: &mut TokenSlice) -> PResult<(Node<FunctionExpression>, bool)> {
fn function_decl(i: &mut TokenSlice) -> PResult<Node<FunctionExpression>> {
fn return_type(i: &mut TokenSlice) -> PResult<Node<Type>> {
colon(i)?;
ignore_whitespace(i);
@ -1256,8 +1246,6 @@ fn function_decl(i: &mut TokenSlice) -> PResult<(Node<FunctionExpression>, bool)
let params = parameters(i)?;
close_paren(i)?;
ignore_whitespace(i);
let arrow = opt(big_arrow).parse_next(i)?;
ignore_whitespace(i);
// Optional return type.
let return_type = opt(return_type).parse_next(i)?;
ignore_whitespace(i);
@ -1282,18 +1270,7 @@ fn function_decl(i: &mut TokenSlice) -> PResult<(Node<FunctionExpression>, bool)
open.module_id,
);
let has_arrow =
if let Some(arrow) = arrow {
ParseContext::warn(
CompilationError::err(arrow.as_source_range(), "Unnecessary `=>` in function declaration")
.with_suggestion("Remove `=>`", "", None, Tag::Unnecessary),
);
true
} else {
false
};
Ok((result, has_arrow))
Ok(result)
}
/// E.g. `person.name`
@ -2140,7 +2117,7 @@ fn declaration(i: &mut TokenSlice) -> PResult<BoxNode<VariableDeclaration>> {
ignore_whitespace(i);
let val = function_decl
.map(|t| Box::new(t.0))
.map(Box::new)
.map(Expr::FunctionExpression)
.context(expected("a KCL function expression, like () { return 1 }"))
.parse_next(i);
@ -2174,7 +2151,7 @@ fn declaration(i: &mut TokenSlice) -> PResult<BoxNode<VariableDeclaration>> {
if let Some((_, tok)) = decl_token {
let range_to_remove = SourceRange::new(tok.start, id.start, id.module_id);
ParseContext::warn(
ParseContext::err(
CompilationError::err(
tok.as_source_range(),
format!(
@ -2582,12 +2559,6 @@ fn some_brace(symbol: &'static str, i: &mut TokenSlice) -> PResult<Token> {
.parse_next(i)
}
/// Parse a => operator.
fn big_arrow(i: &mut TokenSlice) -> PResult<Token> {
one_of((TokenType::Operator, "=>"))
.context(expected("the => symbol, used for declaring functions"))
.parse_next(i)
}
/// Parse a |> operator.
fn pipe_operator(i: &mut TokenSlice) -> PResult<Token> {
one_of((TokenType::Operator, PIPE_OPERATOR))
@ -3313,7 +3284,7 @@ mod tests {
return 1
}"#;
let tokens = crate::parsing::token::lex(test_program, ModuleId::default()).unwrap();
let expr = function_decl.map(|t| t.0).parse_next(&mut tokens.as_slice()).unwrap();
let expr = function_decl.parse_next(&mut tokens.as_slice()).unwrap();
assert_eq!(expr.params, vec![]);
let comment_start = expr.body.body[0].get_comments();
let comment0 = expr.body.body[1].get_comments();
@ -3330,7 +3301,7 @@ mod tests {
comment */
}"#;
let tokens = crate::parsing::token::lex(test_program, ModuleId::default()).unwrap();
let expr = function_decl.map(|t| t.0).parse_next(&mut tokens.as_slice()).unwrap();
let expr = function_decl.parse_next(&mut tokens.as_slice()).unwrap();
let comment0 = &expr.body.non_code_meta.non_code_nodes.get(&0).unwrap()[0];
assert_eq!(comment0.value(), "block\ncomment");
}
@ -3399,7 +3370,7 @@ mySk1 = startSketchOn(XY)
}";
let module_id = ModuleId::from_usize(1);
let tokens = crate::parsing::token::lex(test_program, module_id).unwrap();
let expr = function_decl.map(|t| t.0).parse_next(&mut tokens.as_slice()).unwrap();
let expr = function_decl.parse_next(&mut tokens.as_slice()).unwrap();
assert_eq!(
expr.body.non_code_meta.start_nodes,
vec![Node::new(
@ -4559,7 +4530,7 @@ export fn cos(num: number(rad)): number(_) {}"#;
#[test]
fn zero_param_function() {
let code = r#"
fn firstPrimeNumber = () => {
fn firstPrimeNumber() {
return 2
}
firstPrimeNumber()
@ -4647,26 +4618,6 @@ thing(false)
crate::parsing::top_level_parse(some_program_string).unwrap();
}
#[test]
fn test_error_define_function_as_var() {
for name in ["var", "let", "const"] {
let some_program_string = format!(
r#"{} thing = (param) => {{
return true
}}
thing(false)
"#,
name
);
assert_err(
&some_program_string,
"Expected a `fn` variable kind, found: `const`",
[0, name.len()],
);
}
}
#[test]
fn test_error_define_var_as_function() {
// TODO: https://github.com/KittyCAD/modeling-app/issues/784
@ -4690,7 +4641,7 @@ thing(false)
#[test]
fn test_member_expression_sketch() {
let some_program_string = r#"fn cube = (pos, scale) => {
let some_program_string = r#"fn cube(pos, scale) {
sg = startSketchOn('XY')
|> startProfileAt(pos, %)
|> line([0, scale], %)
@ -4718,7 +4669,7 @@ let other_thing = 2 * cos(3)"#;
#[test]
fn test_negative_arguments() {
let some_program_string = r#"fn box = (p, h, l, w) => {
let some_program_string = r#"fn box(p, h, l, w) {
myBox = startSketchOn('XY')
|> startProfileAt(p, %)
|> line([0, l], %)
@ -4969,67 +4920,6 @@ bar = 1
);
}
#[test]
fn warn_object_expr() {
let some_program_string = "{ foo: bar }";
let (_, errs) = assert_no_err(some_program_string);
assert_eq!(errs.len(), 1);
assert_eq!(errs[0].apply_suggestion(some_program_string).unwrap(), "{ foo = bar }")
}
#[test]
fn warn_fn_decl() {
let some_program_string = r#"fn foo = () => {
return 0
}"#;
let (_, errs) = assert_no_err(some_program_string);
assert_eq!(errs.len(), 2);
let replaced = errs[0].apply_suggestion(some_program_string).unwrap();
let replaced = errs[1].apply_suggestion(&replaced).unwrap();
// Note the whitespace here is bad, but we're just testing the suggestion spans really. In
// real life we might reformat after applying suggestions.
assert_eq!(
replaced,
r#"fn foo () {
return 0
}"#
);
let some_program_string = r#"myMap = map([0..5], (n) => {
return n * 2
})"#;
let (_, errs) = assert_no_err(some_program_string);
assert_eq!(errs.len(), 2);
let replaced = errs[0].apply_suggestion(some_program_string).unwrap();
let replaced = errs[1].apply_suggestion(&replaced).unwrap();
assert_eq!(
replaced,
r#"myMap = map([0..5], fn(n) {
return n * 2
})"#
);
}
#[test]
fn warn_const() {
let some_program_string = r#"const foo = 0
let bar = 1
var baz = 2
"#;
let (_, errs) = assert_no_err(some_program_string);
assert_eq!(errs.len(), 3);
let replaced = errs[2].apply_suggestion(some_program_string).unwrap();
let replaced = errs[1].apply_suggestion(&replaced).unwrap();
let replaced = errs[0].apply_suggestion(&replaced).unwrap();
assert_eq!(
replaced,
r#"foo = 0
bar = 1
baz = 2
"#
);
}
#[test]
fn test_unary_not_on_keyword_bool() {
let some_program_string = r#"!true"#;
@ -5196,11 +5086,11 @@ mod snapshot_tests {
snapshot_test!(c, "myVar = min(-legLen(5, 4), 5)");
snapshot_test!(d, "myVar = 5 + 6 |> myFunc(45, %)");
snapshot_test!(e, "let x = 1 * (3 - 4)");
snapshot_test!(e, "x = 1 * (3 - 4)");
snapshot_test!(f, r#"x = 1 // this is an inline comment"#);
snapshot_test!(
g,
r#"fn x = () => {
r#"fn x() {
return sg
return sg
}"#
@ -5208,32 +5098,32 @@ mod snapshot_tests {
snapshot_test!(d2, r#"x = -leg2 + thickness"#);
snapshot_test!(
h,
r#"obj = { a: 1, b: 2 }
r#"obj = { a = 1, b = 2 }
height = 1 - obj.a"#
);
snapshot_test!(
i,
r#"obj = { a: 1, b: 2 }
r#"obj = { a = 1, b = 2 }
height = 1 - obj["a"]"#
);
snapshot_test!(
j,
r#"obj = { a: 1, b: 2 }
r#"obj = { a = 1, b = 2 }
height = obj["a"] - 1"#
);
snapshot_test!(
k,
r#"obj = { a: 1, b: 2 }
r#"obj = { a = 1, b = 2 }
height = [1 - obj["a"], 0]"#
);
snapshot_test!(
l,
r#"obj = { a: 1, b: 2 }
r#"obj = { a = 1, b = 2 }
height = [obj["a"] - 1, 0]"#
);
snapshot_test!(
m,
r#"obj = { a: 1, b: 2 }
r#"obj = {a = 1, b = 2 }
height = [obj["a"] -1, 0]"#
);
snapshot_test!(n, "height = 1 - obj.a");
@ -5242,7 +5132,7 @@ mod snapshot_tests {
snapshot_test!(q, r#"height = [ obj["a"], 0 ]"#);
snapshot_test!(
r,
r#"obj = { a: 1, b: 2 }
r#"obj = { a = 1, b = 2 }
height = obj["a"]"#
);
snapshot_test!(s, r#"prop = yo["one"][two]"#);
@ -5263,14 +5153,14 @@ mod snapshot_tests {
snapshot_test!(
ad,
r#"
fn firstPrimeNumber = () => {
fn firstPrimeNumber() {
return 2
}
firstPrimeNumber()"#
);
snapshot_test!(
ae,
r#"fn thing = (param) => {
r#"fn thing(param) {
return true
}
thing(false)"#
@ -5300,10 +5190,10 @@ mod snapshot_tests {
snapshot_test!(ar, r#"5 + "a""#);
snapshot_test!(at, "line([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(angle, 360) }");
snapshot_test!(
aw,
"let numbers = [
"numbers = [
1,
// A,
// B,
@ -5312,7 +5202,7 @@ mod snapshot_tests {
);
snapshot_test!(
ax,
"let numbers = [
"numbers = [
1,
2,
// A,
@ -5329,7 +5219,7 @@ mod snapshot_tests {
);
snapshot_test!(
az,
"let props = {
"props = {
a: 1,
// b: 2,
c: 3
@ -5359,14 +5249,14 @@ my14 = 4 ^ 2 - 3 ^ 2 * 2
5
}"#
);
snapshot_test!(be, "let x = 3 == 3");
snapshot_test!(bf, "let x = 3 != 3");
snapshot_test!(be, "x = 3 == 3");
snapshot_test!(bf, "x = 3 != 3");
snapshot_test!(bg, r#"x = 4"#);
snapshot_test!(bh, "obj = {center : [10, 10], radius: 5}");
snapshot_test!(bh, "obj = {center = [10, 10], radius =5}");
snapshot_test!(
bi,
r#"x = 3
obj = { x, y: 4}"#
obj = { x, y = 4}"#
);
snapshot_test!(bj, "true");
snapshot_test!(bk, "truee");

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 5,
"declaration": {
"commentStart": 8,
"end": 57,
"end": 51,
"id": {
"commentStart": 8,
"end": 24,
@ -21,10 +21,10 @@ expression: actual
"body": [
{
"argument": {
"commentStart": 50,
"end": 51,
"commentStart": 44,
"end": 45,
"raw": "2",
"start": 50,
"start": 44,
"type": "Literal",
"type": "Literal",
"value": {
@ -32,65 +32,65 @@ expression: actual
"suffix": "None"
}
},
"commentStart": 43,
"end": 51,
"start": 43,
"commentStart": 37,
"end": 45,
"start": 37,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"commentStart": 33,
"end": 57,
"start": 33
"commentStart": 27,
"end": 51,
"start": 27
},
"commentStart": 27,
"end": 57,
"commentStart": 24,
"end": 51,
"params": [],
"start": 27,
"start": 24,
"type": "FunctionExpression",
"type": "FunctionExpression"
},
"start": 8,
"type": "VariableDeclarator"
},
"end": 57,
"end": 51,
"kind": "fn",
"start": 5,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 62,
"end": 80,
"commentStart": 56,
"end": 74,
"expression": {
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 62,
"end": 78,
"commentStart": 56,
"end": 72,
"name": {
"commentStart": 62,
"end": 78,
"commentStart": 56,
"end": 72,
"name": "firstPrimeNumber",
"start": 62,
"start": 56,
"type": "Identifier"
},
"path": [],
"start": 62,
"start": 56,
"type": "Name"
},
"commentStart": 62,
"end": 80,
"start": 62,
"commentStart": 56,
"end": 74,
"start": 56,
"type": "CallExpression",
"type": "CallExpression"
},
"start": 62,
"start": 56,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
}
],
"commentStart": 0,
"end": 80,
"end": 74,
"start": 0
}

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 0,
"declaration": {
"commentStart": 3,
"end": 49,
"end": 43,
"id": {
"commentStart": 3,
"end": 8,
@ -21,62 +21,62 @@ expression: actual
"body": [
{
"argument": {
"commentStart": 39,
"end": 43,
"commentStart": 33,
"end": 37,
"raw": "true",
"start": 39,
"start": 33,
"type": "Literal",
"type": "Literal",
"value": true
},
"commentStart": 32,
"end": 43,
"start": 32,
"commentStart": 26,
"end": 37,
"start": 26,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"commentStart": 22,
"end": 49,
"start": 22
"commentStart": 16,
"end": 43,
"start": 16
},
"commentStart": 11,
"end": 49,
"commentStart": 8,
"end": 43,
"params": [
{
"type": "Parameter",
"identifier": {
"commentStart": 12,
"end": 17,
"commentStart": 9,
"end": 14,
"name": "param",
"start": 12,
"start": 9,
"type": "Identifier"
}
}
],
"start": 11,
"start": 8,
"type": "FunctionExpression",
"type": "FunctionExpression"
},
"start": 3,
"type": "VariableDeclarator"
},
"end": 49,
"end": 43,
"kind": "fn",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 54,
"end": 66,
"commentStart": 48,
"end": 60,
"expression": {
"arguments": [
{
"commentStart": 60,
"end": 65,
"commentStart": 54,
"end": 59,
"raw": "false",
"start": 60,
"start": 54,
"type": "Literal",
"type": "Literal",
"value": false
@ -84,31 +84,31 @@ expression: actual
],
"callee": {
"abs_path": false,
"commentStart": 54,
"end": 59,
"commentStart": 48,
"end": 53,
"name": {
"commentStart": 54,
"end": 59,
"commentStart": 48,
"end": 53,
"name": "thing",
"start": 54,
"start": 48,
"type": "Identifier"
},
"path": [],
"start": 54,
"start": 48,
"type": "Name"
},
"commentStart": 54,
"end": 66,
"start": 54,
"commentStart": 48,
"end": 60,
"start": 48,
"type": "CallExpression",
"type": "CallExpression"
},
"start": 54,
"start": 48,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
}
],
"commentStart": 0,
"end": 66,
"end": 60,
"start": 0
}

View File

@ -7,13 +7,13 @@ expression: actual
{
"commentStart": 0,
"declaration": {
"commentStart": 6,
"end": 104,
"commentStart": 0,
"end": 98,
"id": {
"commentStart": 6,
"end": 14,
"commentStart": 0,
"end": 8,
"name": "cylinder",
"start": 6,
"start": 0,
"type": "Identifier"
},
"init": {
@ -22,39 +22,39 @@ expression: actual
"arguments": [
{
"abs_path": false,
"commentStart": 31,
"end": 33,
"commentStart": 25,
"end": 27,
"name": {
"commentStart": 31,
"end": 33,
"commentStart": 25,
"end": 27,
"name": "XY",
"start": 31,
"start": 25,
"type": "Identifier"
},
"path": [],
"start": 31,
"start": 25,
"type": "Name",
"type": "Name"
}
],
"callee": {
"abs_path": false,
"commentStart": 17,
"end": 30,
"commentStart": 11,
"end": 24,
"name": {
"commentStart": 17,
"end": 30,
"commentStart": 11,
"end": 24,
"name": "startSketchOn",
"start": 17,
"start": 11,
"type": "Identifier"
},
"path": [],
"start": 17,
"start": 11,
"type": "Name"
},
"commentStart": 17,
"end": 34,
"start": 17,
"commentStart": 11,
"end": 28,
"start": 11,
"type": "CallExpression",
"type": "CallExpression"
},
@ -63,20 +63,20 @@ expression: actual
{
"type": "LabeledArg",
"label": {
"commentStart": 49,
"end": 55,
"commentStart": 43,
"end": 49,
"name": "center",
"start": 49,
"start": 43,
"type": "Identifier"
},
"arg": {
"commentStart": 57,
"commentStart": 51,
"elements": [
{
"commentStart": 58,
"end": 59,
"commentStart": 52,
"end": 53,
"raw": "0",
"start": 58,
"start": 52,
"type": "Literal",
"type": "Literal",
"value": {
@ -85,10 +85,10 @@ expression: actual
}
},
{
"commentStart": 61,
"end": 62,
"commentStart": 55,
"end": 56,
"raw": "0",
"start": 61,
"start": 55,
"type": "Literal",
"type": "Literal",
"value": {
@ -97,8 +97,8 @@ expression: actual
}
}
],
"end": 63,
"start": 57,
"end": 57,
"start": 51,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
@ -106,17 +106,17 @@ expression: actual
{
"type": "LabeledArg",
"label": {
"commentStart": 65,
"end": 71,
"commentStart": 59,
"end": 65,
"name": "radius",
"start": 65,
"start": 59,
"type": "Identifier"
},
"arg": {
"commentStart": 73,
"end": 75,
"commentStart": 67,
"end": 69,
"raw": "22",
"start": 73,
"start": 67,
"type": "Literal",
"type": "Literal",
"value": {
@ -128,22 +128,22 @@ expression: actual
],
"callee": {
"abs_path": false,
"commentStart": 42,
"end": 48,
"commentStart": 36,
"end": 42,
"name": {
"commentStart": 42,
"end": 48,
"commentStart": 36,
"end": 42,
"name": "circle",
"start": 42,
"start": 36,
"type": "Identifier"
},
"path": [],
"start": 42,
"start": 36,
"type": "Name"
},
"commentStart": 42,
"end": 76,
"start": 42,
"commentStart": 36,
"end": 70,
"start": 36,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -153,17 +153,17 @@ expression: actual
{
"type": "LabeledArg",
"label": {
"commentStart": 92,
"end": 98,
"commentStart": 86,
"end": 92,
"name": "length",
"start": 92,
"start": 86,
"type": "Identifier"
},
"arg": {
"commentStart": 101,
"end": 103,
"commentStart": 95,
"end": 97,
"raw": "14",
"start": 101,
"start": 95,
"type": "Literal",
"type": "Literal",
"value": {
@ -175,37 +175,37 @@ expression: actual
],
"callee": {
"abs_path": false,
"commentStart": 84,
"end": 91,
"commentStart": 78,
"end": 85,
"name": {
"commentStart": 84,
"end": 91,
"commentStart": 78,
"end": 85,
"name": "extrude",
"start": 84,
"start": 78,
"type": "Identifier"
},
"path": [],
"start": 84,
"start": 78,
"type": "Name"
},
"commentStart": 84,
"end": 104,
"start": 84,
"commentStart": 78,
"end": 98,
"start": 78,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 17,
"end": 104,
"start": 17,
"commentStart": 11,
"end": 98,
"start": 11,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 6,
"start": 0,
"type": "VariableDeclarator"
},
"end": 104,
"end": 98,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
@ -213,6 +213,6 @@ expression: actual
}
],
"commentStart": 0,
"end": 105,
"end": 99,
"start": 0
}

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 0,
"declaration": {
"commentStart": 3,
"end": 49,
"end": 43,
"id": {
"commentStart": 3,
"end": 4,
@ -24,25 +24,25 @@ expression: actual
"arguments": [
{
"abs_path": false,
"commentStart": 36,
"end": 41,
"commentStart": 30,
"end": 35,
"name": {
"commentStart": 36,
"end": 41,
"commentStart": 30,
"end": 35,
"name": "angle",
"start": 36,
"start": 30,
"type": "Identifier"
},
"path": [],
"start": 36,
"start": 30,
"type": "Name",
"type": "Name"
},
{
"commentStart": 43,
"end": 46,
"commentStart": 37,
"end": 40,
"raw": "360",
"start": 43,
"start": 37,
"type": "Literal",
"type": "Literal",
"value": {
@ -53,46 +53,46 @@ expression: actual
],
"callee": {
"abs_path": false,
"commentStart": 28,
"end": 35,
"commentStart": 22,
"end": 29,
"name": {
"commentStart": 28,
"end": 35,
"commentStart": 22,
"end": 29,
"name": "default",
"start": 28,
"start": 22,
"type": "Identifier"
},
"path": [],
"start": 28,
"start": 22,
"type": "Name"
},
"commentStart": 28,
"end": 47,
"start": 28,
"commentStart": 22,
"end": 41,
"start": 22,
"type": "CallExpression",
"type": "CallExpression"
},
"commentStart": 21,
"end": 47,
"start": 21,
"commentStart": 15,
"end": 41,
"start": 15,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"commentStart": 19,
"end": 49,
"start": 19
"commentStart": 13,
"end": 43,
"start": 13
},
"commentStart": 7,
"end": 49,
"commentStart": 4,
"end": 43,
"params": [
{
"type": "Parameter",
"identifier": {
"commentStart": 8,
"end": 13,
"commentStart": 5,
"end": 10,
"name": "angle",
"start": 8,
"start": 5,
"type": "Identifier"
},
"default_value": {
@ -102,14 +102,14 @@ expression: actual
}
}
],
"start": 7,
"start": 4,
"type": "FunctionExpression",
"type": "FunctionExpression"
},
"start": 3,
"type": "VariableDeclarator"
},
"end": 49,
"end": 43,
"kind": "fn",
"start": 0,
"type": "VariableDeclaration",
@ -117,6 +117,6 @@ expression: actual
}
],
"commentStart": 0,
"end": 49,
"end": 43,
"start": 0
}

View File

@ -7,23 +7,23 @@ expression: actual
{
"commentStart": 0,
"declaration": {
"commentStart": 4,
"end": 91,
"commentStart": 0,
"end": 87,
"id": {
"commentStart": 4,
"end": 11,
"commentStart": 0,
"end": 7,
"name": "numbers",
"start": 4,
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 14,
"commentStart": 10,
"elements": [
{
"commentStart": 28,
"end": 29,
"commentStart": 24,
"end": 25,
"raw": "1",
"start": 28,
"start": 24,
"type": "Literal",
"type": "Literal",
"value": {
@ -32,10 +32,10 @@ expression: actual
}
},
{
"commentStart": 79,
"end": 80,
"commentStart": 75,
"end": 76,
"raw": "3",
"start": 79,
"start": 75,
"type": "Literal",
"type": "Literal",
"value": {
@ -44,14 +44,14 @@ expression: actual
}
}
],
"end": 91,
"end": 87,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 43,
"end": 48,
"start": 43,
"commentStart": 39,
"end": 44,
"start": 39,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
@ -62,9 +62,9 @@ expression: actual
],
"2": [
{
"commentStart": 61,
"end": 66,
"start": 61,
"commentStart": 57,
"end": 62,
"start": 57,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
@ -76,14 +76,14 @@ expression: actual
},
"startNodes": []
},
"start": 14,
"start": 10,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
"start": 4,
"start": 0,
"type": "VariableDeclarator"
},
"end": 91,
"end": 87,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
@ -91,6 +91,6 @@ expression: actual
}
],
"commentStart": 0,
"end": 91,
"end": 87,
"start": 0
}

View File

@ -7,23 +7,23 @@ expression: actual
{
"commentStart": 0,
"declaration": {
"commentStart": 4,
"end": 91,
"commentStart": 0,
"end": 87,
"id": {
"commentStart": 4,
"end": 11,
"commentStart": 0,
"end": 7,
"name": "numbers",
"start": 4,
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 14,
"commentStart": 10,
"elements": [
{
"commentStart": 28,
"end": 29,
"commentStart": 24,
"end": 25,
"raw": "1",
"start": 28,
"start": 24,
"type": "Literal",
"type": "Literal",
"value": {
@ -32,10 +32,10 @@ expression: actual
}
},
{
"commentStart": 43,
"end": 44,
"commentStart": 39,
"end": 40,
"raw": "2",
"start": 43,
"start": 39,
"type": "Literal",
"type": "Literal",
"value": {
@ -44,14 +44,14 @@ expression: actual
}
}
],
"end": 91,
"end": 87,
"nonCodeMeta": {
"nonCodeNodes": {
"2": [
{
"commentStart": 58,
"end": 63,
"start": 58,
"commentStart": 54,
"end": 59,
"start": 54,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
@ -62,9 +62,9 @@ expression: actual
],
"3": [
{
"commentStart": 76,
"end": 81,
"start": 76,
"commentStart": 72,
"end": 77,
"start": 72,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
@ -76,14 +76,14 @@ expression: actual
},
"startNodes": []
},
"start": 14,
"start": 10,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
"start": 4,
"start": 0,
"type": "VariableDeclarator"
},
"end": 91,
"end": 87,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
@ -91,6 +91,6 @@ expression: actual
}
],
"commentStart": 0,
"end": 91,
"end": 87,
"start": 0
}

View File

@ -7,25 +7,25 @@ expression: actual
{
"commentStart": 0,
"declaration": {
"commentStart": 4,
"end": 79,
"commentStart": 0,
"end": 75,
"id": {
"commentStart": 4,
"end": 9,
"commentStart": 0,
"end": 5,
"name": "props",
"start": 4,
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 12,
"end": 79,
"commentStart": 8,
"end": 75,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 44,
"end": 52,
"start": 44,
"commentStart": 40,
"end": 48,
"start": 40,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
@ -39,22 +39,22 @@ expression: actual
},
"properties": [
{
"commentStart": 26,
"end": 30,
"commentStart": 22,
"end": 26,
"key": {
"commentStart": 26,
"end": 27,
"commentStart": 22,
"end": 23,
"name": "a",
"start": 26,
"start": 22,
"type": "Identifier"
},
"start": 26,
"start": 22,
"type": "ObjectProperty",
"value": {
"commentStart": 29,
"end": 30,
"commentStart": 25,
"end": 26,
"raw": "1",
"start": 29,
"start": 25,
"type": "Literal",
"type": "Literal",
"value": {
@ -64,22 +64,22 @@ expression: actual
}
},
{
"commentStart": 65,
"end": 69,
"commentStart": 61,
"end": 65,
"key": {
"commentStart": 65,
"end": 66,
"commentStart": 61,
"end": 62,
"name": "c",
"start": 65,
"start": 61,
"type": "Identifier"
},
"start": 65,
"start": 61,
"type": "ObjectProperty",
"value": {
"commentStart": 68,
"end": 69,
"commentStart": 64,
"end": 65,
"raw": "3",
"start": 68,
"start": 64,
"type": "Literal",
"type": "Literal",
"value": {
@ -89,14 +89,14 @@ expression: actual
}
}
],
"start": 12,
"start": 8,
"type": "ObjectExpression",
"type": "ObjectExpression"
},
"start": 4,
"start": 0,
"type": "VariableDeclarator"
},
"end": 79,
"end": 75,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
@ -104,6 +104,6 @@ expression: actual
}
],
"commentStart": 0,
"end": 79,
"end": 75,
"start": 0
}

View File

@ -7,23 +7,23 @@ expression: actual
{
"commentStart": 0,
"declaration": {
"commentStart": 4,
"end": 14,
"commentStart": 0,
"end": 10,
"id": {
"commentStart": 4,
"end": 5,
"commentStart": 0,
"end": 1,
"name": "x",
"start": 4,
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 8,
"end": 14,
"commentStart": 4,
"end": 10,
"left": {
"commentStart": 8,
"end": 9,
"commentStart": 4,
"end": 5,
"raw": "3",
"start": 8,
"start": 4,
"type": "Literal",
"type": "Literal",
"value": {
@ -33,10 +33,10 @@ expression: actual
},
"operator": "==",
"right": {
"commentStart": 13,
"end": 14,
"commentStart": 9,
"end": 10,
"raw": "3",
"start": 13,
"start": 9,
"type": "Literal",
"type": "Literal",
"value": {
@ -44,14 +44,14 @@ expression: actual
"suffix": "None"
}
},
"start": 8,
"start": 4,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 4,
"start": 0,
"type": "VariableDeclarator"
},
"end": 14,
"end": 10,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
@ -59,6 +59,6 @@ expression: actual
}
],
"commentStart": 0,
"end": 14,
"end": 10,
"start": 0
}

View File

@ -7,23 +7,23 @@ expression: actual
{
"commentStart": 0,
"declaration": {
"commentStart": 4,
"end": 14,
"commentStart": 0,
"end": 10,
"id": {
"commentStart": 4,
"end": 5,
"commentStart": 0,
"end": 1,
"name": "x",
"start": 4,
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 8,
"end": 14,
"commentStart": 4,
"end": 10,
"left": {
"commentStart": 8,
"end": 9,
"commentStart": 4,
"end": 5,
"raw": "3",
"start": 8,
"start": 4,
"type": "Literal",
"type": "Literal",
"value": {
@ -33,10 +33,10 @@ expression: actual
},
"operator": "!=",
"right": {
"commentStart": 13,
"end": 14,
"commentStart": 9,
"end": 10,
"raw": "3",
"start": 13,
"start": 9,
"type": "Literal",
"type": "Literal",
"value": {
@ -44,14 +44,14 @@ expression: actual
"suffix": "None"
}
},
"start": 8,
"start": 4,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 4,
"start": 0,
"type": "VariableDeclarator"
},
"end": 14,
"end": 10,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
@ -59,6 +59,6 @@ expression: actual
}
],
"commentStart": 0,
"end": 14,
"end": 10,
"start": 0
}

View File

@ -41,7 +41,7 @@ expression: actual
"commentStart": 14,
"declaration": {
"commentStart": 14,
"end": 30,
"end": 31,
"id": {
"commentStart": 14,
"end": 17,
@ -51,7 +51,7 @@ expression: actual
},
"init": {
"commentStart": 20,
"end": 30,
"end": 31,
"properties": [
{
"commentStart": 22,
@ -84,7 +84,7 @@ expression: actual
},
{
"commentStart": 25,
"end": 29,
"end": 30,
"key": {
"commentStart": 25,
"end": 26,
@ -95,10 +95,10 @@ expression: actual
"start": 25,
"type": "ObjectProperty",
"value": {
"commentStart": 28,
"end": 29,
"commentStart": 29,
"end": 30,
"raw": "4",
"start": 28,
"start": 29,
"type": "Literal",
"type": "Literal",
"value": {
@ -115,7 +115,7 @@ expression: actual
"start": 14,
"type": "VariableDeclarator"
},
"end": 30,
"end": 31,
"kind": "const",
"start": 14,
"type": "VariableDeclaration",
@ -123,6 +123,6 @@ expression: actual
}
],
"commentStart": 0,
"end": 30,
"end": 31,
"start": 0
}

View File

@ -7,23 +7,23 @@ expression: actual
{
"commentStart": 0,
"declaration": {
"commentStart": 4,
"end": 18,
"commentStart": 0,
"end": 14,
"id": {
"commentStart": 4,
"end": 5,
"commentStart": 0,
"end": 1,
"name": "x",
"start": 4,
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 8,
"end": 18,
"commentStart": 4,
"end": 14,
"left": {
"commentStart": 8,
"end": 9,
"commentStart": 4,
"end": 5,
"raw": "1",
"start": 8,
"start": 4,
"type": "Literal",
"type": "Literal",
"value": {
@ -33,13 +33,13 @@ expression: actual
},
"operator": "*",
"right": {
"commentStart": 13,
"end": 18,
"commentStart": 9,
"end": 14,
"left": {
"commentStart": 13,
"end": 14,
"commentStart": 9,
"end": 10,
"raw": "3",
"start": 13,
"start": 9,
"type": "Literal",
"type": "Literal",
"value": {
@ -49,10 +49,10 @@ expression: actual
},
"operator": "-",
"right": {
"commentStart": 17,
"end": 18,
"commentStart": 13,
"end": 14,
"raw": "4",
"start": 17,
"start": 13,
"type": "Literal",
"type": "Literal",
"value": {
@ -60,18 +60,18 @@ expression: actual
"suffix": "None"
}
},
"start": 13,
"start": 9,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 8,
"start": 4,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 4,
"start": 0,
"type": "VariableDeclarator"
},
"end": 18,
"end": 14,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
@ -79,6 +79,6 @@ expression: actual
}
],
"commentStart": 0,
"end": 18,
"end": 14,
"start": 0
}

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 0,
"declaration": {
"commentStart": 3,
"end": 58,
"end": 52,
"id": {
"commentStart": 3,
"end": 4,
@ -22,65 +22,65 @@ expression: actual
{
"argument": {
"abs_path": false,
"commentStart": 30,
"end": 32,
"commentStart": 24,
"end": 26,
"name": {
"commentStart": 30,
"end": 32,
"commentStart": 24,
"end": 26,
"name": "sg",
"start": 30,
"start": 24,
"type": "Identifier"
},
"path": [],
"start": 30,
"start": 24,
"type": "Name",
"type": "Name"
},
"commentStart": 23,
"end": 32,
"start": 23,
"commentStart": 17,
"end": 26,
"start": 17,
"type": "ReturnStatement",
"type": "ReturnStatement"
},
{
"argument": {
"abs_path": false,
"commentStart": 48,
"end": 50,
"commentStart": 42,
"end": 44,
"name": {
"commentStart": 48,
"end": 50,
"commentStart": 42,
"end": 44,
"name": "sg",
"start": 48,
"start": 42,
"type": "Identifier"
},
"path": [],
"start": 48,
"start": 42,
"type": "Name",
"type": "Name"
},
"commentStart": 41,
"end": 50,
"start": 41,
"commentStart": 35,
"end": 44,
"start": 35,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"commentStart": 13,
"end": 58,
"start": 13
"commentStart": 7,
"end": 52,
"start": 7
},
"commentStart": 7,
"end": 58,
"commentStart": 4,
"end": 52,
"params": [],
"start": 7,
"start": 4,
"type": "FunctionExpression",
"type": "FunctionExpression"
},
"start": 3,
"type": "VariableDeclarator"
},
"end": 58,
"end": 52,
"kind": "fn",
"start": 0,
"type": "VariableDeclaration",
@ -88,6 +88,6 @@ expression: actual
}
],
"commentStart": 0,
"end": 58,
"end": 52,
"start": 0
}

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 0,
"declaration": {
"commentStart": 0,
"end": 20,
"end": 22,
"id": {
"commentStart": 0,
"end": 3,
@ -18,11 +18,11 @@ expression: actual
},
"init": {
"commentStart": 6,
"end": 20,
"end": 22,
"properties": [
{
"commentStart": 8,
"end": 12,
"end": 13,
"key": {
"commentStart": 8,
"end": 9,
@ -33,10 +33,10 @@ expression: actual
"start": 8,
"type": "ObjectProperty",
"value": {
"commentStart": 11,
"end": 12,
"commentStart": 12,
"end": 13,
"raw": "1",
"start": 11,
"start": 12,
"type": "Literal",
"type": "Literal",
"value": {
@ -46,22 +46,22 @@ expression: actual
}
},
{
"commentStart": 14,
"end": 18,
"commentStart": 15,
"end": 20,
"key": {
"commentStart": 14,
"end": 15,
"commentStart": 15,
"end": 16,
"name": "b",
"start": 14,
"start": 15,
"type": "Identifier"
},
"start": 14,
"start": 15,
"type": "ObjectProperty",
"value": {
"commentStart": 17,
"end": 18,
"commentStart": 19,
"end": 20,
"raw": "2",
"start": 17,
"start": 19,
"type": "Literal",
"type": "Literal",
"value": {
@ -78,32 +78,32 @@ expression: actual
"start": 0,
"type": "VariableDeclarator"
},
"end": 20,
"end": 22,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 25,
"commentStart": 27,
"declaration": {
"commentStart": 25,
"end": 43,
"commentStart": 27,
"end": 45,
"id": {
"commentStart": 25,
"end": 31,
"commentStart": 27,
"end": 33,
"name": "height",
"start": 25,
"start": 27,
"type": "Identifier"
},
"init": {
"commentStart": 34,
"end": 43,
"commentStart": 36,
"end": 45,
"left": {
"commentStart": 34,
"end": 35,
"commentStart": 36,
"end": 37,
"raw": "1",
"start": 34,
"start": 36,
"type": "Literal",
"type": "Literal",
"value": {
@ -113,44 +113,44 @@ expression: actual
},
"operator": "-",
"right": {
"commentStart": 38,
"commentStart": 40,
"computed": false,
"end": 43,
"end": 45,
"object": {
"commentStart": 38,
"end": 41,
"commentStart": 40,
"end": 43,
"name": "obj",
"start": 38,
"start": 40,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"commentStart": 42,
"end": 43,
"commentStart": 44,
"end": 45,
"name": "a",
"start": 42,
"start": 44,
"type": "Identifier",
"type": "Identifier"
},
"start": 38,
"start": 40,
"type": "MemberExpression",
"type": "MemberExpression"
},
"start": 34,
"start": 36,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 25,
"start": 27,
"type": "VariableDeclarator"
},
"end": 43,
"end": 45,
"kind": "const",
"start": 25,
"start": 27,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"commentStart": 0,
"end": 43,
"end": 45,
"start": 0
}

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 0,
"declaration": {
"commentStart": 0,
"end": 20,
"end": 22,
"id": {
"commentStart": 0,
"end": 3,
@ -18,11 +18,11 @@ expression: actual
},
"init": {
"commentStart": 6,
"end": 20,
"end": 22,
"properties": [
{
"commentStart": 8,
"end": 12,
"end": 13,
"key": {
"commentStart": 8,
"end": 9,
@ -33,10 +33,10 @@ expression: actual
"start": 8,
"type": "ObjectProperty",
"value": {
"commentStart": 11,
"end": 12,
"commentStart": 12,
"end": 13,
"raw": "1",
"start": 11,
"start": 12,
"type": "Literal",
"type": "Literal",
"value": {
@ -46,22 +46,22 @@ expression: actual
}
},
{
"commentStart": 14,
"end": 18,
"commentStart": 15,
"end": 20,
"key": {
"commentStart": 14,
"end": 15,
"commentStart": 15,
"end": 16,
"name": "b",
"start": 14,
"start": 15,
"type": "Identifier"
},
"start": 14,
"start": 15,
"type": "ObjectProperty",
"value": {
"commentStart": 17,
"end": 18,
"commentStart": 19,
"end": 20,
"raw": "2",
"start": 17,
"start": 19,
"type": "Literal",
"type": "Literal",
"value": {
@ -78,32 +78,32 @@ expression: actual
"start": 0,
"type": "VariableDeclarator"
},
"end": 20,
"end": 22,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 26,
"commentStart": 28,
"declaration": {
"commentStart": 26,
"end": 47,
"commentStart": 28,
"end": 49,
"id": {
"commentStart": 26,
"end": 32,
"commentStart": 28,
"end": 34,
"name": "height",
"start": 26,
"start": 28,
"type": "Identifier"
},
"init": {
"commentStart": 35,
"end": 47,
"commentStart": 37,
"end": 49,
"left": {
"commentStart": 35,
"end": 36,
"commentStart": 37,
"end": 38,
"raw": "1",
"start": 35,
"start": 37,
"type": "Literal",
"type": "Literal",
"value": {
@ -113,45 +113,45 @@ expression: actual
},
"operator": "-",
"right": {
"commentStart": 39,
"commentStart": 41,
"computed": false,
"end": 47,
"end": 49,
"object": {
"commentStart": 39,
"end": 42,
"commentStart": 41,
"end": 44,
"name": "obj",
"start": 39,
"start": 41,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"commentStart": 43,
"end": 46,
"commentStart": 45,
"end": 48,
"raw": "\"a\"",
"start": 43,
"start": 45,
"type": "Literal",
"type": "Literal",
"value": "a"
},
"start": 39,
"start": 41,
"type": "MemberExpression",
"type": "MemberExpression"
},
"start": 35,
"start": 37,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 26,
"start": 28,
"type": "VariableDeclarator"
},
"end": 47,
"end": 49,
"kind": "const",
"start": 26,
"start": 28,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"commentStart": 0,
"end": 47,
"end": 49,
"start": 0
}

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 0,
"declaration": {
"commentStart": 0,
"end": 20,
"end": 22,
"id": {
"commentStart": 0,
"end": 3,
@ -18,11 +18,11 @@ expression: actual
},
"init": {
"commentStart": 6,
"end": 20,
"end": 22,
"properties": [
{
"commentStart": 8,
"end": 12,
"end": 13,
"key": {
"commentStart": 8,
"end": 9,
@ -33,10 +33,10 @@ expression: actual
"start": 8,
"type": "ObjectProperty",
"value": {
"commentStart": 11,
"end": 12,
"commentStart": 12,
"end": 13,
"raw": "1",
"start": 11,
"start": 12,
"type": "Literal",
"type": "Literal",
"value": {
@ -46,22 +46,22 @@ expression: actual
}
},
{
"commentStart": 14,
"end": 18,
"commentStart": 15,
"end": 20,
"key": {
"commentStart": 14,
"end": 15,
"commentStart": 15,
"end": 16,
"name": "b",
"start": 14,
"start": 15,
"type": "Identifier"
},
"start": 14,
"start": 15,
"type": "ObjectProperty",
"value": {
"commentStart": 17,
"end": 18,
"commentStart": 19,
"end": 20,
"raw": "2",
"start": 17,
"start": 19,
"type": "Literal",
"type": "Literal",
"value": {
@ -78,58 +78,58 @@ expression: actual
"start": 0,
"type": "VariableDeclarator"
},
"end": 20,
"end": 22,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 25,
"commentStart": 27,
"declaration": {
"commentStart": 25,
"end": 46,
"commentStart": 27,
"end": 48,
"id": {
"commentStart": 25,
"end": 31,
"commentStart": 27,
"end": 33,
"name": "height",
"start": 25,
"start": 27,
"type": "Identifier"
},
"init": {
"commentStart": 34,
"end": 46,
"commentStart": 36,
"end": 48,
"left": {
"commentStart": 34,
"commentStart": 36,
"computed": false,
"end": 42,
"end": 44,
"object": {
"commentStart": 34,
"end": 37,
"commentStart": 36,
"end": 39,
"name": "obj",
"start": 34,
"start": 36,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"commentStart": 38,
"end": 41,
"commentStart": 40,
"end": 43,
"raw": "\"a\"",
"start": 38,
"start": 40,
"type": "Literal",
"type": "Literal",
"value": "a"
},
"start": 34,
"start": 36,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "-",
"right": {
"commentStart": 45,
"end": 46,
"commentStart": 47,
"end": 48,
"raw": "1",
"start": 45,
"start": 47,
"type": "Literal",
"type": "Literal",
"value": {
@ -137,21 +137,21 @@ expression: actual
"suffix": "None"
}
},
"start": 34,
"start": 36,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 25,
"start": 27,
"type": "VariableDeclarator"
},
"end": 46,
"end": 48,
"kind": "const",
"start": 25,
"start": 27,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"commentStart": 0,
"end": 46,
"end": 48,
"start": 0
}

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 0,
"declaration": {
"commentStart": 0,
"end": 20,
"end": 22,
"id": {
"commentStart": 0,
"end": 3,
@ -18,11 +18,11 @@ expression: actual
},
"init": {
"commentStart": 6,
"end": 20,
"end": 22,
"properties": [
{
"commentStart": 8,
"end": 12,
"end": 13,
"key": {
"commentStart": 8,
"end": 9,
@ -33,10 +33,10 @@ expression: actual
"start": 8,
"type": "ObjectProperty",
"value": {
"commentStart": 11,
"end": 12,
"commentStart": 12,
"end": 13,
"raw": "1",
"start": 11,
"start": 12,
"type": "Literal",
"type": "Literal",
"value": {
@ -46,22 +46,22 @@ expression: actual
}
},
{
"commentStart": 14,
"end": 18,
"commentStart": 15,
"end": 20,
"key": {
"commentStart": 14,
"end": 15,
"commentStart": 15,
"end": 16,
"name": "b",
"start": 14,
"start": 15,
"type": "Identifier"
},
"start": 14,
"start": 15,
"type": "ObjectProperty",
"value": {
"commentStart": 17,
"end": 18,
"commentStart": 19,
"end": 20,
"raw": "2",
"start": 17,
"start": 19,
"type": "Literal",
"type": "Literal",
"value": {
@ -78,35 +78,35 @@ expression: actual
"start": 0,
"type": "VariableDeclarator"
},
"end": 20,
"end": 22,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 25,
"commentStart": 27,
"declaration": {
"commentStart": 25,
"end": 51,
"commentStart": 27,
"end": 53,
"id": {
"commentStart": 25,
"end": 31,
"commentStart": 27,
"end": 33,
"name": "height",
"start": 25,
"start": 27,
"type": "Identifier"
},
"init": {
"commentStart": 34,
"commentStart": 36,
"elements": [
{
"commentStart": 35,
"end": 47,
"commentStart": 37,
"end": 49,
"left": {
"commentStart": 35,
"end": 36,
"commentStart": 37,
"end": 38,
"raw": "1",
"start": 35,
"start": 37,
"type": "Literal",
"type": "Literal",
"value": {
@ -116,39 +116,39 @@ expression: actual
},
"operator": "-",
"right": {
"commentStart": 39,
"commentStart": 41,
"computed": false,
"end": 47,
"end": 49,
"object": {
"commentStart": 39,
"end": 42,
"commentStart": 41,
"end": 44,
"name": "obj",
"start": 39,
"start": 41,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"commentStart": 43,
"end": 46,
"commentStart": 45,
"end": 48,
"raw": "\"a\"",
"start": 43,
"start": 45,
"type": "Literal",
"type": "Literal",
"value": "a"
},
"start": 39,
"start": 41,
"type": "MemberExpression",
"type": "MemberExpression"
},
"start": 35,
"start": 37,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"commentStart": 49,
"end": 50,
"commentStart": 51,
"end": 52,
"raw": "0",
"start": 49,
"start": 51,
"type": "Literal",
"type": "Literal",
"value": {
@ -157,22 +157,22 @@ expression: actual
}
}
],
"end": 51,
"start": 34,
"end": 53,
"start": 36,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
"start": 25,
"start": 27,
"type": "VariableDeclarator"
},
"end": 51,
"end": 53,
"kind": "const",
"start": 25,
"start": 27,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"commentStart": 0,
"end": 51,
"end": 53,
"start": 0
}

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 0,
"declaration": {
"commentStart": 0,
"end": 20,
"end": 22,
"id": {
"commentStart": 0,
"end": 3,
@ -18,11 +18,11 @@ expression: actual
},
"init": {
"commentStart": 6,
"end": 20,
"end": 22,
"properties": [
{
"commentStart": 8,
"end": 12,
"end": 13,
"key": {
"commentStart": 8,
"end": 9,
@ -33,10 +33,10 @@ expression: actual
"start": 8,
"type": "ObjectProperty",
"value": {
"commentStart": 11,
"end": 12,
"commentStart": 12,
"end": 13,
"raw": "1",
"start": 11,
"start": 12,
"type": "Literal",
"type": "Literal",
"value": {
@ -46,22 +46,22 @@ expression: actual
}
},
{
"commentStart": 14,
"end": 18,
"commentStart": 15,
"end": 20,
"key": {
"commentStart": 14,
"end": 15,
"commentStart": 15,
"end": 16,
"name": "b",
"start": 14,
"start": 15,
"type": "Identifier"
},
"start": 14,
"start": 15,
"type": "ObjectProperty",
"value": {
"commentStart": 17,
"end": 18,
"commentStart": 19,
"end": 20,
"raw": "2",
"start": 17,
"start": 19,
"type": "Literal",
"type": "Literal",
"value": {
@ -78,61 +78,61 @@ expression: actual
"start": 0,
"type": "VariableDeclarator"
},
"end": 20,
"end": 22,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 25,
"commentStart": 27,
"declaration": {
"commentStart": 25,
"end": 51,
"commentStart": 27,
"end": 53,
"id": {
"commentStart": 25,
"end": 31,
"commentStart": 27,
"end": 33,
"name": "height",
"start": 25,
"start": 27,
"type": "Identifier"
},
"init": {
"commentStart": 34,
"commentStart": 36,
"elements": [
{
"commentStart": 35,
"end": 47,
"commentStart": 37,
"end": 49,
"left": {
"commentStart": 35,
"commentStart": 37,
"computed": false,
"end": 43,
"end": 45,
"object": {
"commentStart": 35,
"end": 38,
"commentStart": 37,
"end": 40,
"name": "obj",
"start": 35,
"start": 37,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"commentStart": 39,
"end": 42,
"commentStart": 41,
"end": 44,
"raw": "\"a\"",
"start": 39,
"start": 41,
"type": "Literal",
"type": "Literal",
"value": "a"
},
"start": 35,
"start": 37,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "-",
"right": {
"commentStart": 46,
"end": 47,
"commentStart": 48,
"end": 49,
"raw": "1",
"start": 46,
"start": 48,
"type": "Literal",
"type": "Literal",
"value": {
@ -140,15 +140,15 @@ expression: actual
"suffix": "None"
}
},
"start": 35,
"start": 37,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"commentStart": 49,
"end": 50,
"commentStart": 51,
"end": 52,
"raw": "0",
"start": 49,
"start": 51,
"type": "Literal",
"type": "Literal",
"value": {
@ -157,22 +157,22 @@ expression: actual
}
}
],
"end": 51,
"start": 34,
"end": 53,
"start": 36,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
"start": 25,
"start": 27,
"type": "VariableDeclarator"
},
"end": 51,
"end": 53,
"kind": "const",
"start": 25,
"start": 27,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"commentStart": 0,
"end": 51,
"end": 53,
"start": 0
}

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 0,
"declaration": {
"commentStart": 0,
"end": 20,
"end": 21,
"id": {
"commentStart": 0,
"end": 3,
@ -18,19 +18,19 @@ expression: actual
},
"init": {
"commentStart": 6,
"end": 20,
"end": 21,
"properties": [
{
"commentStart": 8,
"commentStart": 7,
"end": 12,
"key": {
"commentStart": 8,
"end": 9,
"commentStart": 7,
"end": 8,
"name": "a",
"start": 8,
"start": 7,
"type": "Identifier"
},
"start": 8,
"start": 7,
"type": "ObjectProperty",
"value": {
"commentStart": 11,
@ -47,7 +47,7 @@ expression: actual
},
{
"commentStart": 14,
"end": 18,
"end": 19,
"key": {
"commentStart": 14,
"end": 15,
@ -58,10 +58,10 @@ expression: actual
"start": 14,
"type": "ObjectProperty",
"value": {
"commentStart": 17,
"end": 18,
"commentStart": 18,
"end": 19,
"raw": "2",
"start": 17,
"start": 18,
"type": "Literal",
"type": "Literal",
"value": {
@ -78,61 +78,61 @@ expression: actual
"start": 0,
"type": "VariableDeclarator"
},
"end": 20,
"end": 21,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 25,
"commentStart": 26,
"declaration": {
"commentStart": 25,
"end": 50,
"commentStart": 26,
"end": 51,
"id": {
"commentStart": 25,
"end": 31,
"commentStart": 26,
"end": 32,
"name": "height",
"start": 25,
"start": 26,
"type": "Identifier"
},
"init": {
"commentStart": 34,
"commentStart": 35,
"elements": [
{
"commentStart": 35,
"end": 46,
"commentStart": 36,
"end": 47,
"left": {
"commentStart": 35,
"commentStart": 36,
"computed": false,
"end": 43,
"end": 44,
"object": {
"commentStart": 35,
"end": 38,
"commentStart": 36,
"end": 39,
"name": "obj",
"start": 35,
"start": 36,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"commentStart": 39,
"end": 42,
"commentStart": 40,
"end": 43,
"raw": "\"a\"",
"start": 39,
"start": 40,
"type": "Literal",
"type": "Literal",
"value": "a"
},
"start": 35,
"start": 36,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "-",
"right": {
"commentStart": 45,
"end": 46,
"commentStart": 46,
"end": 47,
"raw": "1",
"start": 45,
"start": 46,
"type": "Literal",
"type": "Literal",
"value": {
@ -140,15 +140,15 @@ expression: actual
"suffix": "None"
}
},
"start": 35,
"start": 36,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"commentStart": 48,
"end": 49,
"commentStart": 49,
"end": 50,
"raw": "0",
"start": 48,
"start": 49,
"type": "Literal",
"type": "Literal",
"value": {
@ -157,22 +157,22 @@ expression: actual
}
}
],
"end": 50,
"start": 34,
"end": 51,
"start": 35,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
"start": 25,
"start": 26,
"type": "VariableDeclarator"
},
"end": 50,
"end": 51,
"kind": "const",
"start": 25,
"start": 26,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"commentStart": 0,
"end": 50,
"end": 51,
"start": 0
}

View File

@ -8,7 +8,7 @@ expression: actual
"commentStart": 0,
"declaration": {
"commentStart": 0,
"end": 20,
"end": 22,
"id": {
"commentStart": 0,
"end": 3,
@ -18,11 +18,11 @@ expression: actual
},
"init": {
"commentStart": 6,
"end": 20,
"end": 22,
"properties": [
{
"commentStart": 8,
"end": 12,
"end": 13,
"key": {
"commentStart": 8,
"end": 9,
@ -33,10 +33,10 @@ expression: actual
"start": 8,
"type": "ObjectProperty",
"value": {
"commentStart": 11,
"end": 12,
"commentStart": 12,
"end": 13,
"raw": "1",
"start": 11,
"start": 12,
"type": "Literal",
"type": "Literal",
"value": {
@ -46,22 +46,22 @@ expression: actual
}
},
{
"commentStart": 14,
"end": 18,
"commentStart": 15,
"end": 20,
"key": {
"commentStart": 14,
"end": 15,
"commentStart": 15,
"end": 16,
"name": "b",
"start": 14,
"start": 15,
"type": "Identifier"
},
"start": 14,
"start": 15,
"type": "ObjectProperty",
"value": {
"commentStart": 17,
"end": 18,
"commentStart": 19,
"end": 20,
"raw": "2",
"start": 17,
"start": 19,
"type": "Literal",
"type": "Literal",
"value": {
@ -78,60 +78,60 @@ expression: actual
"start": 0,
"type": "VariableDeclarator"
},
"end": 20,
"end": 22,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 25,
"commentStart": 27,
"declaration": {
"commentStart": 25,
"end": 42,
"commentStart": 27,
"end": 44,
"id": {
"commentStart": 25,
"end": 31,
"commentStart": 27,
"end": 33,
"name": "height",
"start": 25,
"start": 27,
"type": "Identifier"
},
"init": {
"commentStart": 34,
"commentStart": 36,
"computed": false,
"end": 42,
"end": 44,
"object": {
"commentStart": 34,
"end": 37,
"commentStart": 36,
"end": 39,
"name": "obj",
"start": 34,
"start": 36,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"commentStart": 38,
"end": 41,
"commentStart": 40,
"end": 43,
"raw": "\"a\"",
"start": 38,
"start": 40,
"type": "Literal",
"type": "Literal",
"value": "a"
},
"start": 34,
"start": 36,
"type": "MemberExpression",
"type": "MemberExpression"
},
"start": 25,
"start": 27,
"type": "VariableDeclarator"
},
"end": 42,
"end": 44,
"kind": "const",
"start": 25,
"start": 27,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"commentStart": 0,
"end": 42,
"end": 44,
"start": 0
}