"vscode:/vscode.git/clone" did not exist on "02cc28d19b6b8ab43cb69f16ffa85d7888b04103"
stream.h 410 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <ios>
#include <string>

namespace YAML
{
	struct Stream
	{
		Stream(std::istream& input_): input(input_), line(0), column(0) {}

		int pos() const;
		operator bool();
		bool operator !() { return !(*this); }

		std::istream& stream() const { return input; }
		char peek();
		char get();
		std::string get(int n);
		void eat(int n = 1);

		std::istream& input;
		int line, column;
	};
}