Exemple #1
0
        public GotoLabel(string name, GotoLabelStatementSyntax?label)
        {
            LorettaDebug.Assert(!string.IsNullOrEmpty(name));

            Name         = name;
            LabelSyntax  = label;
            JumpSyntaxes = SpecializedCollections.ReadOnlyEnumerable(_jumps);
        }
Exemple #2
0
 public Scope(ScopeKind kind, SyntaxNode?node, IScopeInternal?parent)
 {
     Kind                = kind;
     Node                = node;
     Parent              = parent;
     DeclaredVariables   = SpecializedCollections.ReadOnlyEnumerable(_declaredVariables);
     ReferencedVariables = SpecializedCollections.ReadOnlyEnumerable(_referencedVariables);
     GotoLabels          = SpecializedCollections.ReadOnlyEnumerable(_labels.Values);
 }
Exemple #3
0
        public Variable(VariableKind kind, IScopeInternal containingScope, string name, SyntaxNode?declaration)
        {
            RoslynDebug.AssertNotNull(containingScope);
            RoslynDebug.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);
        }
Exemple #4
0
 public FunctionScope(SyntaxNode node, IScopeInternal?parent) : base(ScopeKind.Function, node, parent)
 {
     Parameters        = SpecializedCollections.ReadOnlyEnumerable(_parameters);
     CapturedVariables = SpecializedCollections.ReadOnlyEnumerable(_capturedVariables);
 }