* Show more info on hover for variables Signed-off-by: Nick Cameron <nrc@ncameron.org> * Move hover impls to lsp module Signed-off-by: Nick Cameron <nrc@ncameron.org> * Make hover work on names inside calls, fix doc line breaking, trim docs in tool tips Signed-off-by: Nick Cameron <nrc@ncameron.org> * Test the new hovers; fix signature syntax Signed-off-by: Nick Cameron <nrc@ncameron.org> * Hover tips for kwargs Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
706 lines
21 KiB
Plaintext
706 lines
21 KiB
Plaintext
---
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
description: Result of parsing circular_pattern3d_a_pattern.kcl
|
|
---
|
|
{
|
|
"Ok": {
|
|
"body": [
|
|
{
|
|
"declaration": {
|
|
"end": 178,
|
|
"id": {
|
|
"end": 13,
|
|
"name": "exampleSketch",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"body": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 34,
|
|
"raw": "'XZ'",
|
|
"start": 30,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "XZ"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 29,
|
|
"name": "startSketchOn",
|
|
"start": 16,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 35,
|
|
"start": 16,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"elements": [
|
|
{
|
|
"end": 58,
|
|
"raw": "0",
|
|
"start": 57,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 61,
|
|
"raw": "0",
|
|
"start": 60,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 62,
|
|
"start": 56,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
},
|
|
{
|
|
"end": 65,
|
|
"start": 64,
|
|
"type": "PipeSubstitution",
|
|
"type": "PipeSubstitution"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 55,
|
|
"name": "startProfileAt",
|
|
"start": 41,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 66,
|
|
"start": 41,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 80,
|
|
"name": "end",
|
|
"start": 77,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 85,
|
|
"raw": "0",
|
|
"start": 84,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 88,
|
|
"raw": "2",
|
|
"start": 87,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 89,
|
|
"start": 83,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 76,
|
|
"name": "line",
|
|
"start": 72,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 90,
|
|
"start": 72,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 104,
|
|
"name": "end",
|
|
"start": 101,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 109,
|
|
"raw": "3",
|
|
"start": 108,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 3.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 112,
|
|
"raw": "1",
|
|
"start": 111,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 113,
|
|
"start": 107,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 100,
|
|
"name": "line",
|
|
"start": 96,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 114,
|
|
"start": 96,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 128,
|
|
"name": "end",
|
|
"start": 125,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 133,
|
|
"raw": "0",
|
|
"start": 132,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"argument": {
|
|
"end": 137,
|
|
"raw": "4",
|
|
"start": 136,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 4.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"end": 137,
|
|
"operator": "-",
|
|
"start": 135,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
}
|
|
],
|
|
"end": 138,
|
|
"start": 131,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 124,
|
|
"name": "line",
|
|
"start": 120,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 139,
|
|
"start": 120,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 152,
|
|
"start": 151,
|
|
"type": "PipeSubstitution",
|
|
"type": "PipeSubstitution"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 150,
|
|
"name": "close",
|
|
"start": 145,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 153,
|
|
"start": 145,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 173,
|
|
"name": "length",
|
|
"start": 167,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 177,
|
|
"raw": "1",
|
|
"start": 176,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 166,
|
|
"name": "extrude",
|
|
"start": 159,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 178,
|
|
"start": 159,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
}
|
|
],
|
|
"end": 178,
|
|
"start": 16,
|
|
"type": "PipeExpression",
|
|
"type": "PipeExpression"
|
|
},
|
|
"start": 0,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 178,
|
|
"kind": "const",
|
|
"start": 0,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 277,
|
|
"id": {
|
|
"end": 186,
|
|
"name": "pattn1",
|
|
"start": 180,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 229,
|
|
"name": "axis",
|
|
"start": 225,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 234,
|
|
"raw": "1",
|
|
"start": 233,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 237,
|
|
"raw": "0",
|
|
"start": 236,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 240,
|
|
"raw": "0",
|
|
"start": 239,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 241,
|
|
"start": 232,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 254,
|
|
"name": "instances",
|
|
"start": 245,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 258,
|
|
"raw": "7",
|
|
"start": 257,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 7.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 270,
|
|
"name": "distance",
|
|
"start": 262,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 274,
|
|
"raw": "6",
|
|
"start": 273,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 6.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 204,
|
|
"name": "patternLinear3d",
|
|
"start": 189,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 277,
|
|
"start": 189,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": {
|
|
"end": 221,
|
|
"name": "exampleSketch",
|
|
"start": 208,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
},
|
|
"start": 180,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 277,
|
|
"kind": "const",
|
|
"start": 180,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 432,
|
|
"id": {
|
|
"end": 285,
|
|
"name": "pattn2",
|
|
"start": 279,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 323,
|
|
"name": "axis",
|
|
"start": 319,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 328,
|
|
"raw": "0",
|
|
"start": 327,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 331,
|
|
"raw": "0",
|
|
"start": 330,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 334,
|
|
"raw": "1",
|
|
"start": 333,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 335,
|
|
"start": 326,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 345,
|
|
"name": "center",
|
|
"start": 339,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"argument": {
|
|
"end": 352,
|
|
"raw": "20",
|
|
"start": 350,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 20.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"end": 352,
|
|
"operator": "-",
|
|
"start": 349,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
},
|
|
{
|
|
"argument": {
|
|
"end": 357,
|
|
"raw": "20",
|
|
"start": 355,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 20.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"end": 357,
|
|
"operator": "-",
|
|
"start": 354,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
},
|
|
{
|
|
"argument": {
|
|
"end": 362,
|
|
"raw": "20",
|
|
"start": 360,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 20.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"end": 362,
|
|
"operator": "-",
|
|
"start": 359,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
}
|
|
],
|
|
"end": 363,
|
|
"start": 348,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 376,
|
|
"name": "instances",
|
|
"start": 367,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 381,
|
|
"raw": "41",
|
|
"start": 379,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 41.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 395,
|
|
"name": "arcDegrees",
|
|
"start": 385,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 401,
|
|
"raw": "360",
|
|
"start": 398,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 360.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 421,
|
|
"name": "rotateDuplicates",
|
|
"start": 405,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 429,
|
|
"raw": "false",
|
|
"start": 424,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": false
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 305,
|
|
"name": "patternCircular3d",
|
|
"start": 288,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 432,
|
|
"start": 288,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": {
|
|
"end": 315,
|
|
"name": "pattn1",
|
|
"start": 309,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
},
|
|
"start": 279,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 432,
|
|
"kind": "const",
|
|
"start": 279,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
}
|
|
],
|
|
"end": 433,
|
|
"nonCodeMeta": {
|
|
"nonCodeNodes": {
|
|
"0": [
|
|
{
|
|
"end": 180,
|
|
"start": 178,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLine"
|
|
}
|
|
}
|
|
],
|
|
"1": [
|
|
{
|
|
"end": 279,
|
|
"start": 277,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLine"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"startNodes": []
|
|
},
|
|
"start": 0
|
|
}
|
|
}
|