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"); }
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; }
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); }
internal override void Visit(VariableDereferenceNode node) => this.preOrderNodes.Add((ParseTreeNode)node);