Remove CallExpression support (#6639)

Users MUST use keyword call syntax now.

Closes https://github.com/KittyCAD/modeling-app/issues/4600
This commit is contained in:
Adam Chalmers
2025-05-02 16:08:12 -05:00
committed by GitHub
parent 75916d4300
commit 4fe8741ea7
309 changed files with 51419 additions and 66399 deletions

View File

@ -12,7 +12,7 @@ to other modules.
```kcl
// util.kcl
export fn increment(x) {
export fn increment(@x) {
return x + 1
}
```
@ -37,11 +37,11 @@ Multiple functions can be exported in a file.
```kcl
// util.kcl
export fn increment(x) {
export fn increment(@x) {
return x + 1
}
export fn decrement(x) {
export fn decrement(@x) {
return x - 1
}
```
@ -81,7 +81,7 @@ fn cube(center) {
|> extrude(length = 10)
}
myCube = cube([0, 0])
myCube = cube(center = [0, 0])
```
*Pros*

View File

@ -249,8 +249,8 @@ fn rect(origin) {
|> close()
}
rect([0, 0])
rect([20, 0])
rect(origin = [0, 0])
rect(origin = [20, 0])
```
Those tags would only be available in the `rect` function and not globally.
@ -279,8 +279,8 @@ fn rect(origin) {
|> close()
}
rect([0, 0])
myRect = rect([20, 0])
rect(origin = [0, 0])
myRect = rect(origin = [20, 0])
myRect
|> extrude(length = 10)