Support comments on attributes (#5850)

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-03-20 16:23:20 +13:00
committed by GitHub
parent 79be72c5f0
commit 461a2c3ab2
319 changed files with 37650 additions and 4752 deletions

View File

@ -6,9 +6,12 @@ description: Result of parsing sketch_on_face.kcl
"Ok": {
"body": [
{
"commentStart": 0,
"declaration": {
"commentStart": 0,
"end": 0,
"id": {
"commentStart": 0,
"end": 0,
"name": "part001",
"start": 0,
@ -19,6 +22,7 @@ description: Result of parsing sketch_on_face.kcl
{
"arguments": [
{
"commentStart": 24,
"end": 0,
"raw": "'XY'",
"start": 0,
@ -28,11 +32,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 10,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"commentStart": 10,
"end": 0,
"start": 0,
"type": "CallExpression",
@ -41,8 +47,10 @@ description: Result of parsing sketch_on_face.kcl
{
"arguments": [
{
"commentStart": 50,
"elements": [
{
"commentStart": 51,
"end": 0,
"raw": "11.19",
"start": 0,
@ -54,6 +62,7 @@ description: Result of parsing sketch_on_face.kcl
}
},
{
"commentStart": 58,
"end": 0,
"raw": "28.35",
"start": 0,
@ -71,6 +80,7 @@ description: Result of parsing sketch_on_face.kcl
"type": "ArrayExpression"
},
{
"commentStart": 66,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
@ -78,11 +88,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 35,
"end": 0,
"name": "startProfileAt",
"start": 0,
"type": "Identifier"
},
"commentStart": 35,
"end": 0,
"start": 0,
"type": "CallExpression",
@ -93,14 +105,17 @@ description: Result of parsing sketch_on_face.kcl
{
"type": "LabeledArg",
"label": {
"commentStart": 79,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 85,
"elements": [
{
"commentStart": 86,
"end": 0,
"raw": "28.67",
"start": 0,
@ -113,6 +128,7 @@ description: Result of parsing sketch_on_face.kcl
},
{
"argument": {
"commentStart": 94,
"end": 0,
"raw": "13.25",
"start": 0,
@ -123,6 +139,7 @@ description: Result of parsing sketch_on_face.kcl
"suffix": "None"
}
},
"commentStart": 93,
"end": 0,
"operator": "-",
"start": 0,
@ -139,12 +156,14 @@ description: Result of parsing sketch_on_face.kcl
{
"type": "LabeledArg",
"label": {
"commentStart": 102,
"end": 0,
"name": "tag",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 108,
"end": 0,
"start": 0,
"type": "TagDeclarator",
@ -154,11 +173,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 74,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"commentStart": 74,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
@ -170,15 +191,18 @@ description: Result of parsing sketch_on_face.kcl
{
"type": "LabeledArg",
"label": {
"commentStart": 125,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 131,
"elements": [
{
"argument": {
"commentStart": 133,
"end": 0,
"raw": "4.12",
"start": 0,
@ -189,6 +213,7 @@ description: Result of parsing sketch_on_face.kcl
"suffix": "None"
}
},
"commentStart": 132,
"end": 0,
"operator": "-",
"start": 0,
@ -197,6 +222,7 @@ description: Result of parsing sketch_on_face.kcl
},
{
"argument": {
"commentStart": 140,
"end": 0,
"raw": "22.81",
"start": 0,
@ -207,6 +233,7 @@ description: Result of parsing sketch_on_face.kcl
"suffix": "None"
}
},
"commentStart": 139,
"end": 0,
"operator": "-",
"start": 0,
@ -222,11 +249,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 120,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"commentStart": 120,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
@ -238,15 +267,18 @@ description: Result of parsing sketch_on_face.kcl
{
"type": "LabeledArg",
"label": {
"commentStart": 158,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 164,
"elements": [
{
"argument": {
"commentStart": 166,
"end": 0,
"raw": "33.24",
"start": 0,
@ -257,6 +289,7 @@ description: Result of parsing sketch_on_face.kcl
"suffix": "None"
}
},
"commentStart": 165,
"end": 0,
"operator": "-",
"start": 0,
@ -264,6 +297,7 @@ description: Result of parsing sketch_on_face.kcl
"type": "UnaryExpression"
},
{
"commentStart": 173,
"end": 0,
"raw": "14.55",
"start": 0,
@ -283,11 +317,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 153,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"commentStart": 153,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
@ -297,6 +333,7 @@ description: Result of parsing sketch_on_face.kcl
{
"arguments": [
{
"commentStart": 192,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
@ -304,11 +341,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 186,
"end": 0,
"name": "close",
"start": 0,
"type": "Identifier"
},
"commentStart": 186,
"end": 0,
"start": 0,
"type": "CallExpression",
@ -319,12 +358,14 @@ description: Result of parsing sketch_on_face.kcl
{
"type": "LabeledArg",
"label": {
"commentStart": 208,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 217,
"end": 0,
"raw": "5",
"start": 0,
@ -338,11 +379,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 200,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"commentStart": 200,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
@ -350,6 +393,7 @@ description: Result of parsing sketch_on_face.kcl
"unlabeled": null
}
],
"commentStart": 10,
"end": 0,
"start": 0,
"type": "PipeExpression",
@ -365,9 +409,12 @@ description: Result of parsing sketch_on_face.kcl
"type": "VariableDeclaration"
},
{
"commentStart": 219,
"declaration": {
"commentStart": 221,
"end": 0,
"id": {
"commentStart": 221,
"end": 0,
"name": "part002",
"start": 0,
@ -378,6 +425,7 @@ description: Result of parsing sketch_on_face.kcl
{
"arguments": [
{
"commentStart": 245,
"end": 0,
"name": "part001",
"start": 0,
@ -385,6 +433,7 @@ description: Result of parsing sketch_on_face.kcl
"type": "Identifier"
},
{
"commentStart": 254,
"end": 0,
"name": "here",
"start": 0,
@ -393,11 +442,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 231,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"commentStart": 231,
"end": 0,
"start": 0,
"type": "CallExpression",
@ -406,8 +457,10 @@ description: Result of parsing sketch_on_face.kcl
{
"arguments": [
{
"commentStart": 280,
"elements": [
{
"commentStart": 281,
"end": 0,
"raw": "0",
"start": 0,
@ -419,6 +472,7 @@ description: Result of parsing sketch_on_face.kcl
}
},
{
"commentStart": 284,
"end": 0,
"raw": "0",
"start": 0,
@ -436,6 +490,7 @@ description: Result of parsing sketch_on_face.kcl
"type": "ArrayExpression"
},
{
"commentStart": 288,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
@ -443,11 +498,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 265,
"end": 0,
"name": "startProfileAt",
"start": 0,
"type": "Identifier"
},
"commentStart": 265,
"end": 0,
"start": 0,
"type": "CallExpression",
@ -458,14 +515,17 @@ description: Result of parsing sketch_on_face.kcl
{
"type": "LabeledArg",
"label": {
"commentStart": 301,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 307,
"elements": [
{
"commentStart": 308,
"end": 0,
"raw": "0",
"start": 0,
@ -477,6 +537,7 @@ description: Result of parsing sketch_on_face.kcl
}
},
{
"commentStart": 311,
"end": 0,
"raw": "10",
"start": 0,
@ -496,11 +557,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 296,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"commentStart": 296,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
@ -512,14 +575,17 @@ description: Result of parsing sketch_on_face.kcl
{
"type": "LabeledArg",
"label": {
"commentStart": 326,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 332,
"elements": [
{
"commentStart": 333,
"end": 0,
"raw": "10",
"start": 0,
@ -531,6 +597,7 @@ description: Result of parsing sketch_on_face.kcl
}
},
{
"commentStart": 337,
"end": 0,
"raw": "0",
"start": 0,
@ -550,11 +617,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 321,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"commentStart": 321,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
@ -566,14 +635,17 @@ description: Result of parsing sketch_on_face.kcl
{
"type": "LabeledArg",
"label": {
"commentStart": 351,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 357,
"elements": [
{
"commentStart": 358,
"end": 0,
"raw": "0",
"start": 0,
@ -586,6 +658,7 @@ description: Result of parsing sketch_on_face.kcl
},
{
"argument": {
"commentStart": 362,
"end": 0,
"raw": "10",
"start": 0,
@ -596,6 +669,7 @@ description: Result of parsing sketch_on_face.kcl
"suffix": "None"
}
},
"commentStart": 361,
"end": 0,
"operator": "-",
"start": 0,
@ -611,11 +685,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 346,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"commentStart": 346,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
@ -625,6 +701,7 @@ description: Result of parsing sketch_on_face.kcl
{
"arguments": [
{
"commentStart": 378,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
@ -632,11 +709,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 372,
"end": 0,
"name": "close",
"start": 0,
"type": "Identifier"
},
"commentStart": 372,
"end": 0,
"start": 0,
"type": "CallExpression",
@ -647,12 +726,14 @@ description: Result of parsing sketch_on_face.kcl
{
"type": "LabeledArg",
"label": {
"commentStart": 394,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 403,
"end": 0,
"raw": "5",
"start": 0,
@ -666,11 +747,13 @@ description: Result of parsing sketch_on_face.kcl
}
],
"callee": {
"commentStart": 386,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"commentStart": 386,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
@ -678,6 +761,7 @@ description: Result of parsing sketch_on_face.kcl
"unlabeled": null
}
],
"commentStart": 231,
"end": 0,
"start": 0,
"type": "PipeExpression",
@ -693,11 +777,13 @@ description: Result of parsing sketch_on_face.kcl
"type": "VariableDeclaration"
}
],
"commentStart": 0,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"0": [
{
"commentStart": 219,
"end": 0,
"start": 0,
"type": "NonCodeNode",

View File

@ -20,6 +20,7 @@ description: Variables in memory after executing sketch_on_face.kcl
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 108,
"end": 113,
"start": 108,
"type": "TagDeclarator",
@ -63,6 +64,7 @@ description: Variables in memory after executing sketch_on_face.kcl
28.35
],
"tag": {
"commentStart": 108,
"end": 113,
"start": 108,
"type": "TagDeclarator",
@ -349,6 +351,7 @@ description: Variables in memory after executing sketch_on_face.kcl
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 108,
"end": 113,
"start": 108,
"type": "TagDeclarator",
@ -392,6 +395,7 @@ description: Variables in memory after executing sketch_on_face.kcl
28.35
],
"tag": {
"commentStart": 108,
"end": 113,
"start": 108,
"type": "TagDeclarator",