* 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>
173 lines
4.3 KiB
Plaintext
173 lines
4.3 KiB
Plaintext
---
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
description: Result of parsing import_whole.kcl
|
|
---
|
|
{
|
|
"Ok": {
|
|
"body": [
|
|
{
|
|
"end": 66,
|
|
"path": {
|
|
"type": "Kcl",
|
|
"filename": "exported_mod.kcl"
|
|
},
|
|
"selector": {
|
|
"type": "None",
|
|
"alias": {
|
|
"end": 66,
|
|
"name": "foo",
|
|
"start": 63,
|
|
"type": "Identifier"
|
|
}
|
|
},
|
|
"start": 34,
|
|
"type": "ImportStatement",
|
|
"type": "ImportStatement"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 123,
|
|
"id": {
|
|
"end": 71,
|
|
"name": "bar",
|
|
"start": 68,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"body": [
|
|
{
|
|
"end": 77,
|
|
"name": "foo",
|
|
"start": 74,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 94,
|
|
"name": "faces",
|
|
"start": 89,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 103,
|
|
"raw": "'end'",
|
|
"start": 98,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "end"
|
|
}
|
|
],
|
|
"end": 104,
|
|
"start": 97,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 115,
|
|
"name": "thickness",
|
|
"start": 106,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 122,
|
|
"raw": "0.25",
|
|
"start": 118,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.25,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 88,
|
|
"name": "shell",
|
|
"start": 83,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 123,
|
|
"start": 83,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
}
|
|
],
|
|
"end": 123,
|
|
"start": 74,
|
|
"type": "PipeExpression",
|
|
"type": "PipeExpression"
|
|
},
|
|
"start": 68,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 123,
|
|
"kind": "const",
|
|
"start": 68,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
}
|
|
],
|
|
"end": 124,
|
|
"innerAttrs": [
|
|
{
|
|
"end": 33,
|
|
"name": {
|
|
"end": 9,
|
|
"name": "settings",
|
|
"start": 1,
|
|
"type": "Identifier"
|
|
},
|
|
"properties": [
|
|
{
|
|
"end": 32,
|
|
"key": {
|
|
"end": 27,
|
|
"name": "defaultLengthUnit",
|
|
"start": 10,
|
|
"type": "Identifier"
|
|
},
|
|
"start": 10,
|
|
"type": "ObjectProperty",
|
|
"value": {
|
|
"end": 32,
|
|
"name": "mm",
|
|
"start": 30,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"start": 0,
|
|
"type": "Annotation"
|
|
}
|
|
],
|
|
"nonCodeMeta": {
|
|
"nonCodeNodes": {
|
|
"0": [
|
|
{
|
|
"end": 68,
|
|
"start": 66,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLine"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"startNodes": []
|
|
},
|
|
"start": 0
|
|
}
|
|
}
|