public ExpandableStringExpressionAst(IScriptExtent extent, string value, System.Management.Automation.Language.StringConstantType type) : base(extent)
        {
            if (value == null)
            {
                throw PSTraceSource.NewArgumentNullException("value");
            }
            if (((type != System.Management.Automation.Language.StringConstantType.DoubleQuoted) && (type != System.Management.Automation.Language.StringConstantType.DoubleQuotedHereString)) && (type != System.Management.Automation.Language.StringConstantType.BareWord))
            {
                throw PSTraceSource.NewArgumentException("type");
            }
            ExpressionAst ast = Parser.ScanString(value);
            ExpandableStringExpressionAst ast2 = ast as ExpandableStringExpressionAst;

            if (ast2 != null)
            {
                this.FormatExpression  = ast2.FormatExpression;
                this.NestedExpressions = ast2.NestedExpressions;
            }
            else
            {
                this.FormatExpression  = "{0}";
                this.NestedExpressions = new ReadOnlyCollection <ExpressionAst>(new ExpressionAst[] { ast });
            }
            this.Value = value;
            this.StringConstantType = type;
        }
 public StringConstantExpressionAst(IScriptExtent extent, string value, System.Management.Automation.Language.StringConstantType stringConstantType) : base(extent, value)
 {
     if (value == null)
     {
         throw PSTraceSource.NewArgumentNullException("value");
     }
     this.StringConstantType = stringConstantType;
 }