From 1958b829f22e3b69d4c4c23662e0d1c7c4d2e62b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 24 Jun 2017 11:43:45 +0200 Subject: Make VC compatible with 'export module M;' by fixing up preprocessed output --- build2/cc/lexer.hxx | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'build2/cc/lexer.hxx') diff --git a/build2/cc/lexer.hxx b/build2/cc/lexer.hxx index c74a0a9..65e9012 100644 --- a/build2/cc/lexer.hxx +++ b/build2/cc/lexer.hxx @@ -50,22 +50,19 @@ namespace build2 struct token { - token_type type; + token_type type = token_type::eos; string value; + // Logical position. + // path file; - uint64_t line; - uint64_t column; - - public: - token () - : token (token_type::eos, 0, 0) {} + uint64_t line = 0; + uint64_t column = 0; - token (token_type t, uint64_t l, uint64_t c) - : token (t, string (), l, c) {} - - token (token_type t, string v, uint64_t l, uint64_t c) - : type (t), value (move (v)), line (l), column (c) {} + // Physical position in the stream, currently only for identifiers and + // only if the stream is ifdstream. + // + uint64_t position = 0; }; // Output the token value in a format suitable for diagnostics. -- cgit v1.1