Пример #1
0
            public GotoLabelWalker(
                IDictionary <SyntaxNode, IScope> scopes,
                IDictionary <SyntaxNode, IGotoLabel> labels)
                : base(scopes)
            {
                LorettaDebug.AssertNotNull(labels);

                _labels = labels;
            }
Пример #2
0
            protected BaseWalker(
                IDictionary <SyntaxNode, IScope> scopes,
                SyntaxWalkerDepth depth = SyntaxWalkerDepth.Node)
                : base(depth)
            {
                LorettaDebug.AssertNotNull(scopes);

                _scopes = scopes;
            }
Пример #3
0
            public ScopeAndVariableWalker(
                Scope rootScope,
                IDictionary <SyntaxNode, IVariable> variables,
                IDictionary <SyntaxNode, IScope> scopes)
                : base(scopes)
            {
                LorettaDebug.AssertNotNull(rootScope);
                LorettaDebug.AssertNotNull(variables);
                LorettaDebug.AssertNotNull(scopes);

                _rootScope = rootScope;
                _variables = variables;
                _scopeStack.Push(rootScope);
            }
Пример #4
0
        public Variable(VariableKind kind, IScopeInternal containingScope, string name, SyntaxNode?declaration)
        {
            LorettaDebug.AssertNotNull(containingScope);
            LorettaDebug.AssertNotNull(name);

            Kind              = kind;
            ContainingScope   = containingScope;
            Name              = name;
            Declaration       = declaration;
            ReferencingScopes = SpecializedCollections.ReadOnlyEnumerable(_referencingScopes);
            CapturingScopes   = SpecializedCollections.ReadOnlyEnumerable(_capturingScopes);
            ReadLocations     = SpecializedCollections.ReadOnlyEnumerable(_readLocations);
            WriteLocations    = SpecializedCollections.ReadOnlyEnumerable(_writeLocations);
        }
Пример #5
0
 public void AddJump(GotoStatementSyntax jump)
 {
     LorettaDebug.AssertNotNull(jump);
     _jumps.Add(jump);
 }