コード例 #1
0
 internal override void Visit(VariableDereferenceNode node)
 {
     if (node.VariableName.Equals("PSCulture", StringComparison.OrdinalIgnoreCase) || node.VariableName.Equals("PSUICulture", StringComparison.OrdinalIgnoreCase) || (node.VariableName.Equals("true", StringComparison.OrdinalIgnoreCase) || node.VariableName.Equals("false", StringComparison.OrdinalIgnoreCase)) || node.VariableName.Equals("null", StringComparison.OrdinalIgnoreCase) || this._moduleManifest && (node.VariableName.StartsWith("env:", StringComparison.OrdinalIgnoreCase) || node.VariableName.Equals("PSScriptRoot", StringComparison.OrdinalIgnoreCase)))
     {
         return;
     }
     this.ReportError((ParseTreeNode)node, "VariableReferenceNotSupportedInDataSection");
 }
コード例 #2
0
 internal ParameterNode(
     VariableDereferenceNode parameter,
     List <AttributeNode> attributes,
     ParseTreeNode initializer)
 {
     if (parameter != null)
     {
         this.NodeToken = parameter.NodeToken;
     }
     this._parameter   = parameter;
     this._initializer = initializer;
     this._attributes  = attributes;
     this.IsVoidable   = true;
 }
コード例 #3
0
        internal override void Visit(VariableDereferenceNode node)
        {
            if (!node.IsScopedItem)
            {
                return;
            }
            int slot;

            if (!this.variableSlots.TryGetValue(node.VariableName, out slot))
            {
                slot = this.maxVariableSlot++;
                this.variableSlots.Add(node.VariableName, slot);
            }
            node.SetActivationRecordSlot(slot);
        }
コード例 #4
0
 internal override void Visit(VariableDereferenceNode node) => this.preOrderNodes.Add((ParseTreeNode)node);