From cb02be389689d86e93d7e0661d2ceaf52e082510 Mon Sep 17 00:00:00 2001 From: Kuba Ober Date: Wed, 18 Sep 2019 13:58:28 -0400 Subject: [PATCH] Implement hex-base ulong literal. --- capnpc-csharp/Generator/CommonSnippetGen.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/capnpc-csharp/Generator/CommonSnippetGen.cs b/capnpc-csharp/Generator/CommonSnippetGen.cs index 2e1797d..ddb9867 100644 --- a/capnpc-csharp/Generator/CommonSnippetGen.cs +++ b/capnpc-csharp/Generator/CommonSnippetGen.cs @@ -89,5 +89,9 @@ namespace CapnpC.Generator } } + static LiteralExpressionSyntax HexLiteral(ulong id) => + LiteralExpression( + SyntaxKind.NumericLiteralExpression, + Literal($"0x{id:x}UL", id)); } }