Ejemplo n.º 1
0
        public static GblFile ParseStream
        (
            [NotNull] TextReader reader
        )
        {
            GblFile result = new GblFile();

            string line  = reader.RequireLine();
            int    count = int.Parse(line);

            for (int i = 0; i < count; i++)
            {
                GblParameter parameter = GblParameter.ParseStream(reader);
                result.Parameters.Add(parameter);
            }

            while (true)
            {
                GblStatement statement = GblStatement.ParseStream(reader);
                if (statement == null)
                {
                    break;
                }
                result.Statements.Add(statement);
            }

            return(result);
        }
Ejemplo n.º 2
0
        public static GblParameter ParseStream
        (
            [NotNull] TextReader reader
        )
        {
            GblParameter result = new GblParameter
            {
                Value = reader.RequireLine(),
                Name  = reader.RequireLine()
            };

            return(result);
        }