AST: Allow KCL fn params to have defaults and labels (#4676)
Pure refactor, should not change any behaviour. Previously, optional parameters in KCL function calls always set the parameter to KclNone. As of this PR, they can be set to KCL literals in addition to KCL none. However the parser does not actually ever use this (that'll be in a follow-up PR). Also adds a `labeled: bool` to all parameters, which is always true. But it lays the groundwork for the unlabeled first parameter in a follow-up PR.
This commit is contained in:
@ -1236,8 +1236,7 @@ snapshot_kind: text
|
||||
"name": "x",
|
||||
"start": 1207,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"optional": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
@ -1246,8 +1245,7 @@ snapshot_kind: text
|
||||
"name": "y",
|
||||
"start": 1210,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"optional": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
@ -1256,8 +1254,7 @@ snapshot_kind: text
|
||||
"name": "height",
|
||||
"start": 1213,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"start": 1206,
|
||||
|
Reference in New Issue
Block a user