@@ -159,7 +159,6 @@ export class XsltTokenDiagnostics {
159
159
if ( instruction . type === GlobalInstructionType . Variable || instruction . type === GlobalInstructionType . Parameter ) {
160
160
globalVariableData . push ( { token : instruction . token , name : instruction . name } )
161
161
xsltVariableDeclarations . push ( instruction . token ) ;
162
- console . log ( 'global-name: ' + instruction . name ) ;
163
162
}
164
163
} ) ;
165
164
let nameStartCharRgx = new RegExp ( / [ A - Z ] | _ | [ a - z ] | [ \u00C0 - \u00D6 ] | [ \u00D8 - \u00F6 ] | [ \u00F8 - \u02FF ] | [ \u0370 - \u037D ] | [ \u037F - \u1FFF ] | [ \u200C - \u200D ] | [ \u2070 - \u218F ] | [ \u2C00 - \u2FEF ] | [ \u3001 - \uD7FF ] | [ \uF900 - \uFDCF ] | [ \uFDF0 - \uFFFD ] / ) ;
@@ -270,7 +269,7 @@ export class XsltTokenDiagnostics {
270
269
xsltVariableDeclarations . push ( variableData . token ) ;
271
270
}
272
271
if ( startTagToken ) {
273
- // TODO: if a top-level element, use global variables instad of inScopeVariablesList;
272
+ // if a top-level element, use global variables instad of inScopeVariablesList;
274
273
elementStack . push ( { namespacePrefixes : inheritedPrefixesCopy , currentVariable : variableData , variables : newVariablesList ,
275
274
symbolName : tagElementName , symbolID : tagIdentifierName , identifierToken : startTagToken , childSymbols : [ ] } ) ;
276
275
}
@@ -704,10 +703,8 @@ export class XsltTokenDiagnostics {
704
703
if ( xpathVariableCurrentlyBeingDefined && i === decrementedLength ) {
705
704
// do nothing: we skip last item in list as it's currently being defined
706
705
} else if ( data . name === varName && globalVariableName !== data . name ) {
707
- console . log ( 'resolved: ' + varName + ' line: ' + data . token . line ) ;
708
706
resolved = true ;
709
707
data . token [ 'referenced' ] = true ;
710
- console . log ( 'confirmed: ' + data . token . referenced )
711
708
break ;
712
709
}
713
710
}
@@ -742,7 +739,6 @@ export class XsltTokenDiagnostics {
742
739
private static getDiagnosticsFromUnusedVariableTokens ( document : vscode . TextDocument , unusedVariableTokens : BaseToken [ ] , unresolvedVariableTokens : BaseToken [ ] , includeOrImport : boolean ) : vscode . Diagnostic [ ] {
743
740
let result = [ ] ;
744
741
for ( let token of unusedVariableTokens ) {
745
- console . log ( 'testing ' + XsltTokenDiagnostics . getTextForToken ( token . line , token , document ) + ' ' + token . referenced )
746
742
if ( token . referenced === undefined ) {
747
743
result . push ( this . createUnusedVarDiagnostic ( token ) ) ;
748
744
}
0 commit comments