Esempio n. 1
0
        private SourceSpan?Find(ReferencesPool pool, Stride.Core.Shaders.Ast.SourceLocation location)
        {
            foreach (var methodRef in pool.MethodsReferences)
            {
                foreach (var expression in methodRef.Value)
                {
                    if (IsExpressionMatching(expression, location))
                    {
                        return(methodRef.Key.Span);
                    }
                }
            }

            foreach (var variableRef in pool.VariablesReferences)
            {
                foreach (var expression in variableRef.Value)
                {
                    if (IsExpressionMatching(expression.Expression, location))
                    {
                        return(variableRef.Key.Span);
                    }
                }
            }
            return(null);
        }
Esempio n. 2
0
 public ParadoxParsingInfo()
 {
     StageInitializedVariables = new HashSet <Variable>();
     Typedefs             = new List <Typedef>();
     StructureDefinitions = new List <StructType>();
     BaseMethodCalls      = new HashSet <MethodInvocationExpression>();
     ThisMethodCalls      = new HashSet <MethodInvocationExpression>();
     StageMethodCalls     = new HashSet <MethodInvocationExpression>();
     ForEachStatements    = new HashSet <StatementNodeCouple>();
     ClassReferences      = new ReferencesPool();
     StaticReferences     = new ReferencesPool();
     ExternReferences     = new ReferencesPool();
     StageInitReferences  = new ReferencesPool();
     StaticClasses        = new HashSet <ModuleMixin>();
 }