Example #1
0
        public override Value Execute(Args args, Environment environment, SourcePos pos)
        {
            var input = args.GetInput("input", environment.Get("stdin", pos).AsInput());
            var line  = input.ReadLine();

            if (line == null)
            {
                return(ValueNull.NULL);
            }
            return(new ValueString(line));
        }
Example #2
0
        public override Value Execute(Args args, Environment environment, SourcePos pos)
        {
            var input = args.GetInput("input", environment.Get("stdin", pos).AsInput());

            return(new ValueString(input.ReadAll()));
        }