KCL: Allow comments in CallExpressionKw (#5381)

Before, this would not parse:

```
line(
  end = [44.09, 306.95],
  // tag this for later
  tag = $hello
)
```

Now it does.
This commit is contained in:
Adam Chalmers
2025-02-13 17:18:54 -06:00
committed by GitHub
parent e27e9ecc63
commit f37fc357af
6 changed files with 238 additions and 19 deletions

View File

@ -964,6 +964,7 @@ export function createCallExpressionStdLibKw(
end: 0,
moduleId: 0,
outerAttrs: [],
nonCodeMeta: nonCodeMetaEmpty(),
callee: {
type: 'Identifier',
start: 0,
@ -1585,7 +1586,7 @@ export async function deleteFromSelection(
return new Error('Selection not recognised, could not delete')
}
const nonCodeMetaEmpty = () => {
export const nonCodeMetaEmpty = () => {
return { nonCodeNodes: {}, startNodes: [], start: 0, end: 0 }
}