Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case SymbolKind.Namespace:
return get('namespace');
case SymbolKind.Class:
case SymbolKind.Struct:
case SymbolKind.Enum:
case SymbolKind.TypeParameter:
return get('type');
case CclsSymbolKind.TypeAlias:
return get('typeAlias');
// Variables
case SymbolKind.Field:
if (symbol.storage === StorageClass.Static)
return get('staticMemberVariable');
return get('memberVariable');
case SymbolKind.Variable:
if (symbol.storage === StorageClass.Static)
return get('staticVariable');
if (symbol.parentKind === SymbolKind.File ||
symbol.parentKind === SymbolKind.Namespace)
return get('globalVariable');
return get('variable');
case SymbolKind.EnumMember:
return get('enum');
case CclsSymbolKind.Parameter:
return get('parameter');
case CclsSymbolKind.Macro:
return get('macro');
}
}
export const props: { structureTree: SymbolWithMembers[] } = {
structureTree: [
{
name: '"stack-control"',
kind: SymbolKind.Module,
location: {
uri:
'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
range: { start: { line: 0, character: 0 }, end: { line: 27, character: 0 } },
},
path: '"stack-control"',
members: [
{
name: 'EventEmitter',
kind: SymbolKind.Variable,
location: {
uri:
'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
range: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
},
containerName: '"stack-control"',
path: '"stack-control"/EventEmitter',
},
{
name: 'ClrStackView',
kind: SymbolKind.Variable,
location: {
uri:
'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
range: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
},
name: '"stack-control"',
kind: SymbolKind.Module,
range: { start: { line: 0, character: 0 }, end: { line: 27, character: 0 } },
selectionRange: { start: { line: 0, character: 0 }, end: { line: 27, character: 0 } },
path: '"stack-control"',
members: [
{
name: 'EventEmitter',
kind: SymbolKind.Variable,
range: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
selectionRange: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
path: '"stack-control"/EventEmitter',
},
{
name: 'ClrStackView',
kind: SymbolKind.Variable,
range: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
selectionRange: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
path: '"stack-control"/ClrStackView',
},
{
name: 'StackControl',
kind: SymbolKind.Class,
range: { start: { line: 12, character: 0 }, end: { line: 26, character: 1 } },
selectionRange: { start: { line: 12, character: 0 }, end: { line: 26, character: 1 } },
path: '"stack-control"/StackControl',
members: [
{
name: 'model',
kind: SymbolKind.Property,
range: { start: { line: 13, character: 2 }, end: { line: 13, character: 13 } },
selectionRange: {
import { SymbolWithMembers } from '../../../../actions/structure';
export const props: { structureTree: SymbolWithMembers[]; uri: string } = {
uri:
'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
structureTree: [
{
name: '"stack-control"',
kind: SymbolKind.Module,
range: { start: { line: 0, character: 0 }, end: { line: 27, character: 0 } },
selectionRange: { start: { line: 0, character: 0 }, end: { line: 27, character: 0 } },
path: '"stack-control"',
members: [
{
name: 'EventEmitter',
kind: SymbolKind.Variable,
range: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
selectionRange: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
path: '"stack-control"/EventEmitter',
},
{
name: 'ClrStackView',
kind: SymbolKind.Variable,
range: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
selectionRange: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
path: '"stack-control"/ClrStackView',
},
{
name: 'StackControl',
kind: SymbolKind.Class,
range: { start: { line: 12, character: 0 }, end: { line: 26, character: 1 } },
selectionRange: { start: { line: 12, character: 0 }, end: { line: 26, character: 1 } },
path: '"stack-control"',
members: [
{
name: 'EventEmitter',
kind: SymbolKind.Variable,
location: {
uri:
'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
range: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
},
containerName: '"stack-control"',
path: '"stack-control"/EventEmitter',
},
{
name: 'ClrStackView',
kind: SymbolKind.Variable,
location: {
uri:
'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
range: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
},
containerName: '"stack-control"',
path: '"stack-control"/ClrStackView',
},
{
name: 'StackControl',
kind: SymbolKind.Class,
location: {
uri:
'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
range: { start: { line: 12, character: 0 }, end: { line: 26, character: 1 } },
},
case 'enum':
return SymbolKind.Enum;
case 'module':
return SymbolKind.Module;
case 'class':
return SymbolKind.Class;
case 'interface':
return SymbolKind.Interface;
case 'method':
return SymbolKind.Method;
case 'property':
case 'getter':
case 'setter':
return SymbolKind.Property;
}
return SymbolKind.Variable;
}
kind: SymbolKind.Class,
location: null
};
var locationNode = node;
if (node instanceof nodes.Selector) {
entry.name = node.getText();
locationNode = node.findAParent(nodes.NodeType.Ruleset, nodes.NodeType.ExtendsReference);
if (locationNode) {
entry.location = Location.create(document.uri, getRange(locationNode, document));
result.push(entry);
}
return false;
}
else if (node instanceof nodes.VariableDeclaration) {
entry.name = node.getName();
entry.kind = SymbolKind.Variable;
}
else if (node instanceof nodes.MixinDeclaration) {
entry.name = node.getName();
entry.kind = SymbolKind.Method;
}
else if (node instanceof nodes.FunctionDeclaration) {
entry.name = node.getName();
entry.kind = SymbolKind.Function;
}
else if (node instanceof nodes.Keyframe) {
entry.name = localize('literal.keyframes', "@keyframes {0}", node.getName());
}
else if (node instanceof nodes.FontFace) {
entry.name = localize('literal.fontface', "@font-face");
}
if (entry.name) {
function _variableSymbol(node: StylusNode, text: string[]): SymbolInformation {
const name = node.name;
const lineno = Number(node.val!.lineno) - 1;
const column = Math.max(text[lineno].indexOf(name), 0);
const range = Range.create(lineno, column, lineno, column + name.length);
return SymbolInformation.create(name, SymbolKind.Variable, range);
}
case 'enum':
return SymbolKind.Enum;
case 'module':
return SymbolKind.Module;
case 'class':
return SymbolKind.Class;
case 'interface':
return SymbolKind.Interface;
case 'method':
return SymbolKind.Method;
case 'property':
case 'getter':
case 'setter':
return SymbolKind.Property;
}
return SymbolKind.Variable;
}