public static Collection<PSToken> Tokenize(string script, out Collection<PSParseError> errors) { if (script == null) { throw PSTraceSource.NewArgumentNullException("script"); } PSParser parser = new PSParser(); parser.Parse(script); errors = parser.Errors; return parser.Tokens; }
public static Collection <PSToken> Tokenize(string script, out Collection <PSParseError> errors) { if (script == null) { throw PSTraceSource.NewArgumentNullException("script"); } PSParser parser = new PSParser(); parser.Parse(script); errors = parser.Errors; return(parser.Tokens); }
public static Collection <PSToken> Tokenize( string script, out Collection <PSParseError> errors) { if (script == null) { throw PSParser.tracer.NewArgumentNullException(nameof(script)); } PSParser psParser = new PSParser(); psParser.Parse(script); errors = psParser.Errors; return(psParser.Tokens); }
public static Collection <PSToken> Tokenize( object[] script, out Collection <PSParseError> errors) { if (script == null) { throw PSParser.tracer.NewArgumentNullException(nameof(script)); } StringBuilder stringBuilder = new StringBuilder(); foreach (object obj in script) { if (obj != null) { stringBuilder.AppendLine(obj.ToString()); } } return(PSParser.Tokenize(stringBuilder.ToString(), out errors)); }