diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-24 11:43:45 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-24 11:43:45 +0200 |
commit | 1958b829f22e3b69d4c4c23662e0d1c7c4d2e62b (patch) | |
tree | fb94b1cba0d34e9b4cc6e1834495a9bd1e62a289 /build2/cc/lexer.hxx | |
parent | ff8ed209cd80799199e0b2e3d37213d549bc342f (diff) |
Make VC compatible with 'export module M;' by fixing up preprocessed output
Diffstat (limited to 'build2/cc/lexer.hxx')
-rw-r--r-- | build2/cc/lexer.hxx | 21 |
1 files changed, 9 insertions, 12 deletions
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. |