From 2e5083d82395a347d30a7231c94726223508caca Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 6 Mar 2023 19:58:24 -0500 Subject: [PATCH] Add explicit base types to the enums --- assets/parser.d.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/parser.d.erb b/assets/parser.d.erb index 2270e18..4b2f4b7 100644 --- a/assets/parser.d.erb +++ b/assets/parser.d.erb @@ -11,7 +11,7 @@ import std.stdio; class <%= @classname %> { - enum + enum : uint { <% @grammar.tokens.each_with_index do |token, index| %> TOKEN_<%= token.code_name %> = <%= index %>, @@ -36,10 +36,10 @@ class <%= @classname %> static class Decoder { - enum + enum : uint { - CODE_POINT_INVALID = 0xFFFFFFFE, - CODE_POINT_EOF = 0xFFFFFFFF, + CODE_POINT_INVALID = 0xFFFF_FFFE, + CODE_POINT_EOF = 0xFFFF_FFFF, } struct DecodedCodePoint