* 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>
467 lines
15 KiB
Plaintext
467 lines
15 KiB
Plaintext
---
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
|
|
---
|
|
{
|
|
"Ok": {
|
|
"body": [
|
|
{
|
|
"declaration": {
|
|
"end": 298,
|
|
"id": {
|
|
"end": 7,
|
|
"name": "part001",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"body": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 28,
|
|
"raw": "'XY'",
|
|
"start": 24,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "XY"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 23,
|
|
"name": "startSketchOn",
|
|
"start": 10,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 29,
|
|
"start": 10,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"elements": [
|
|
{
|
|
"end": 52,
|
|
"raw": "0",
|
|
"start": 51,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 55,
|
|
"raw": "0",
|
|
"start": 54,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 56,
|
|
"start": 50,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
},
|
|
{
|
|
"end": 59,
|
|
"start": 58,
|
|
"type": "PipeSubstitution",
|
|
"type": "PipeSubstitution"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 49,
|
|
"name": "startProfileAt",
|
|
"start": 35,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 60,
|
|
"start": 35,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 74,
|
|
"name": "end",
|
|
"start": 71,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 79,
|
|
"raw": "0",
|
|
"start": 78,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 83,
|
|
"raw": "10",
|
|
"start": 81,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 10.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 84,
|
|
"start": 77,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 89,
|
|
"name": "tag",
|
|
"start": 86,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 98,
|
|
"start": 92,
|
|
"type": "TagDeclarator",
|
|
"type": "TagDeclarator",
|
|
"value": "thing"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 70,
|
|
"name": "line",
|
|
"start": 66,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 99,
|
|
"start": 66,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 113,
|
|
"name": "end",
|
|
"start": 110,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 119,
|
|
"raw": "10",
|
|
"start": 117,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 10.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 122,
|
|
"raw": "0",
|
|
"start": 121,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 123,
|
|
"start": 116,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 128,
|
|
"name": "tag",
|
|
"start": 125,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 138,
|
|
"start": 131,
|
|
"type": "TagDeclarator",
|
|
"type": "TagDeclarator",
|
|
"value": "thing1"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 109,
|
|
"name": "line",
|
|
"start": 105,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 139,
|
|
"start": 105,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 153,
|
|
"name": "end",
|
|
"start": 150,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 158,
|
|
"raw": "0",
|
|
"start": 157,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"argument": {
|
|
"end": 163,
|
|
"raw": "10",
|
|
"start": 161,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 10.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"end": 163,
|
|
"operator": "-",
|
|
"start": 160,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
}
|
|
],
|
|
"end": 164,
|
|
"start": 156,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 169,
|
|
"name": "tag",
|
|
"start": 166,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 179,
|
|
"start": 172,
|
|
"type": "TagDeclarator",
|
|
"type": "TagDeclarator",
|
|
"value": "thing2"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 149,
|
|
"name": "line",
|
|
"start": 145,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 180,
|
|
"start": 145,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 195,
|
|
"name": "tag",
|
|
"start": 192,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 205,
|
|
"start": 198,
|
|
"type": "TagDeclarator",
|
|
"type": "TagDeclarator",
|
|
"value": "thing3"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 191,
|
|
"name": "close",
|
|
"start": 186,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 206,
|
|
"start": 186,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 226,
|
|
"name": "length",
|
|
"start": 220,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 231,
|
|
"raw": "10",
|
|
"start": 229,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 10.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 219,
|
|
"name": "extrude",
|
|
"start": 212,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 232,
|
|
"start": 212,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 251,
|
|
"name": "radius",
|
|
"start": 245,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 255,
|
|
"raw": "2",
|
|
"start": 254,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 261,
|
|
"name": "tags",
|
|
"start": 257,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 295,
|
|
"name": "thing3",
|
|
"start": 289,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 288,
|
|
"name": "getPreviousAdjacentEdge",
|
|
"start": 265,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 296,
|
|
"start": 265,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
}
|
|
],
|
|
"end": 297,
|
|
"start": 264,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 244,
|
|
"name": "fillet",
|
|
"start": 238,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 298,
|
|
"start": 238,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
}
|
|
],
|
|
"end": 298,
|
|
"start": 10,
|
|
"type": "PipeExpression",
|
|
"type": "PipeExpression"
|
|
},
|
|
"start": 0,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 298,
|
|
"kind": "const",
|
|
"start": 0,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
}
|
|
],
|
|
"end": 299,
|
|
"start": 0
|
|
}
|
|
}
|