KCL: No 'let' or 'const' required when declaring vars (#4063)
Previously variable declaration required a keyword, e.g. ```kcl let x = 4 const x = 4 var x = 4 ``` These were all valid, and did the exact same thing. As of this PR, they're all still valid, but the KCL formatter will change them all to just: ```kcl x = 4 ``` which is the new preferred way to declare a constant. But the formatter will remove the var/let/const keywords. Closes https://github.com/KittyCAD/modeling-app/issues/3985
This commit is contained in:
@ -2027,7 +2027,7 @@ const extrusion = extrude(10, sketch001)
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_angled_line_of_x_length_270() {
|
||||
let code = r#"const sketch001 = startSketchOn('XZ')
|
||||
let code = r#"sketch001 = startSketchOn('XZ')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> angledLineOfXLength({ angle: 90, length: 10 }, %, $edge1)
|
||||
|> angledLineOfXLength({ angle: -15, length: 20 }, %, $edge2)
|
||||
|
Reference in New Issue
Block a user