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:
@ -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*
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user