* 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>
618 lines
18 KiB
Plaintext
618 lines
18 KiB
Plaintext
---
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
description: Result of parsing linear_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": 369,
|
|
"id": {
|
|
"end": 285,
|
|
"name": "pattn2",
|
|
"start": 279,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 321,
|
|
"name": "axis",
|
|
"start": 317,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 326,
|
|
"raw": "0",
|
|
"start": 325,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 329,
|
|
"raw": "0",
|
|
"start": 328,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 332,
|
|
"raw": "1",
|
|
"start": 331,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 333,
|
|
"start": 324,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 345,
|
|
"name": "distance",
|
|
"start": 337,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 349,
|
|
"raw": "1",
|
|
"start": 348,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 362,
|
|
"name": "instances",
|
|
"start": 353,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 366,
|
|
"raw": "7",
|
|
"start": 365,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 7.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 303,
|
|
"name": "patternLinear3d",
|
|
"start": 288,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 369,
|
|
"start": 288,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": {
|
|
"end": 313,
|
|
"name": "pattn1",
|
|
"start": 307,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
},
|
|
"start": 279,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 369,
|
|
"kind": "const",
|
|
"start": 279,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
}
|
|
],
|
|
"end": 370,
|
|
"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
|
|
}
|
|
}
|