(
properties: alphaTab.importer.alphaTex.AlphaTexPropertiesNode,
propertiesDocs: Map<string, PropertyDefinition> | Map<string, PropertyDefinition>[],
offset: number
)
| 122 | } |
| 123 | |
| 124 | function createPropertiesHover( |
| 125 | properties: alphaTab.importer.alphaTex.AlphaTexPropertiesNode, |
| 126 | propertiesDocs: Map<string, PropertyDefinition> | Map<string, PropertyDefinition>[], |
| 127 | offset: number |
| 128 | ): Hover | null { |
| 129 | const prop = binaryNodeSearch(properties.properties, offset); |
| 130 | if (prop) { |
| 131 | let propDocs: PropertyDefinition | undefined; |
| 132 | if (Array.isArray(propertiesDocs)) { |
| 133 | for (const d of propertiesDocs) { |
| 134 | propDocs = d.get(prop.property.text.toLowerCase()); |
| 135 | if (propDocs) { |
| 136 | break; |
| 137 | } |
| 138 | } |
| 139 | } else { |
| 140 | propDocs = propertiesDocs.get(prop.property.text.toLowerCase()); |
| 141 | } |
| 142 | |
| 143 | if (propDocs) { |
| 144 | if (prop.property.start!.offset <= offset && offset <= prop.property.end!.offset) { |
| 145 | return { |
| 146 | contents: { |
| 147 | kind: 'markdown', |
| 148 | value: withSignaturesToMarkdown(propDocs, propDocs.property) |
| 149 | } |
| 150 | }; |
| 151 | } else if (prop.arguments) { |
| 152 | const hover = createArgumentsHover(prop.arguments, propDocs.signatures, offset); |
| 153 | if (hover) { |
| 154 | return hover; |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | return null; |
| 160 | } |
| 161 | |
| 162 | function valueToText(value: alphaTab.importer.alphaTex.IAlphaTexArgumentValue): string { |
| 163 | switch (value.nodeType) { |
no test coverage detected