public virtual object VisitConstantExpression(ConstantExpressionAst constantExpressionAst) { return(constantExpressionAst); }
public virtual object VisitConstantExpression(ConstantExpressionAst constantExpressionAst) { return(new ConstantExpressionAst(constantExpressionAst.Extent, constantExpressionAst.Value)); }
public object VisitConstantExpression(ConstantExpressionAst constantExpressionAst) { return(new CodePrimitiveExpression(constantExpressionAst.Value)); }
public override AstVisitAction VisitConstantExpression(ConstantExpressionAst ast) { return(AstVisitAction.Continue); }
public override AstVisitAction VisitConstantExpression(ConstantExpressionAst constantExpressionAst) { return(Visit(constantExpressionAst)); }
private void ConvertCommand(CommandAst commandAst) { Command command = new Command(this.GetCommandName(commandAst.CommandElements[0]), false, this._createLocalScope); if (commandAst.Redirections.Count > 0) { PipelineResultTypes all; PipelineResultTypes output = PipelineResultTypes.Output; switch (commandAst.Redirections[0].FromStream) { case RedirectionStream.All: all = PipelineResultTypes.All; break; case RedirectionStream.Error: all = PipelineResultTypes.Error; break; case RedirectionStream.Warning: all = PipelineResultTypes.Warning; break; case RedirectionStream.Verbose: all = PipelineResultTypes.Verbose; break; case RedirectionStream.Debug: all = PipelineResultTypes.Debug; break; default: all = PipelineResultTypes.Error; break; } command.MergeMyResults(all, output); } this._powershell.AddCommand(command); foreach (CommandElementAst ast in commandAst.CommandElements.Skip <CommandElementAst>(1)) { ExpressionAst exprAst = ast as ExpressionAst; if (exprAst != null) { VariableExpressionAst variableAst = null; UsingExpressionAst ast4 = ast as UsingExpressionAst; if (ast4 != null) { variableAst = ast4.SubExpression as VariableExpressionAst; if ((variableAst != null) && variableAst.Splatted) { IDictionary parameters = this._usingValues[ast4.RuntimeUsingIndex] as IDictionary; if (parameters != null) { this._powershell.AddParameters(parameters); } else { IEnumerable enumerable = this._usingValues[ast4.RuntimeUsingIndex] as IEnumerable; if (enumerable != null) { foreach (object obj2 in enumerable) { this._powershell.AddArgument(obj2); } } else { this._powershell.AddArgument(this._usingValues[ast4.RuntimeUsingIndex]); } } } else { this._powershell.AddArgument(this._usingValues[ast4.RuntimeUsingIndex]); } } else { variableAst = ast as VariableExpressionAst; if ((variableAst != null) && variableAst.Splatted) { this.GetSplattedVariable(variableAst); } else { object expressionValue; ConstantExpressionAst ast5 = ast as ConstantExpressionAst; if ((ast5 != null) && LanguagePrimitives.IsNumeric(LanguagePrimitives.GetTypeCode(ast5.StaticType))) { string text = ast5.Extent.Text; expressionValue = ast5.Value; if (!text.Equals(ast5.Value.ToString(), StringComparison.Ordinal)) { expressionValue = ParserOps.WrappedNumber(expressionValue, text); } } else { expressionValue = this.GetExpressionValue(exprAst); } this._powershell.AddArgument(expressionValue); } } } else { this.AddParameter((CommandParameterAst)ast); } } }
public object VisitConstantExpression(ConstantExpressionAst constantExpressionAst) { _visitCount++; return(true); }
public override AstVisitAction VisitConstantExpression(ConstantExpressionAst ast) { return(DoNextAction(ast)); }
object ICustomAstVisitor.VisitConstantExpression(ConstantExpressionAst constantExpressionAst) => ProcessRewriter(VisitConstantExpression, constantExpressionAst);
public object VisitConstantExpression(ConstantExpressionAst constantExpressionAst) { return(constantExpressionAst.Value); }
object ICustomAstVisitor.VisitConstantExpression(ConstantExpressionAst constantExpressionAst) => VisitConstantExpression(constantExpressionAst);
public virtual TResult VisitConstantExpression(ConstantExpressionAst constantExpressionAst) => default(TResult);
public void Setup() { this._constantExpressionAst = ParseStatement("1") .PipelineElements[0] .Expression; }
public object VisitConstantExpression(ConstantExpressionAst constantExpressionAst) => null;
public static ConstantExpressionAst Update(this ConstantExpressionAst ast, object value = null) { return(new ConstantExpressionAst(ast.Extent, value ?? ast.Value)); }
public override AstVisitAction VisitConstantExpression(ConstantExpressionAst constantExpressionAst) { this._pipelineCommandRuntime.outputResults.Write(constantExpressionAst.Value); return(AstVisitAction.SkipChildren); }
public override AstVisitAction VisitConstantExpression(ConstantExpressionAst constantExpressionAst) { _currentNode = new Literal(constantExpressionAst.Value.ToString()); return(AstVisitAction.SkipChildren); }
public override ExpressionAst VisitConstantExpression(ConstantExpressionAst constantExpressionAst) => VisitExpression(base.VisitConstantExpression(constantExpressionAst));
public override AstVisitAction VisitConstantExpression(ConstantExpressionAst constantExpressionAst) => VisitAst(constantExpressionAst);