3 using System.Collections.Generic;
5 using SiliconStudio.Paradox.Shaders.Parser.Ast;
6 using SiliconStudio.Shaders.Ast;
7 using SiliconStudio.Shaders.Visitor;
9 namespace SiliconStudio.
Paradox.Shaders.Parser.Mixins
13 private Dictionary<Variable, bool> VariablesUsages;
15 public ParadoxVariableUsageVisitor(Dictionary<Variable, bool> variablesUsages)
18 if (variablesUsages == null)
19 VariablesUsages =
new Dictionary<Variable, bool>();
21 VariablesUsages = variablesUsages;
26 Visit(shaderClassType);
32 Visit((
Node)variableReferenceExpression);
39 Visit((
Node)memberReferenceExpression);
43 private void CheckUsage(
Variable variable)
48 if (VariablesUsages.ContainsKey(variable))
49 VariablesUsages[variable] =
true;
IDeclaration Declaration
Gets or sets the declaration.
TypeInference TypeInference
Gets or sets the type reference.
A member reference in the form {this}.{Name}
A reference to a variable.