From a4670a278b773c07668174d92dcc69000fd64f0e Mon Sep 17 00:00:00 2001 From: Miraculous Ladybugreport <3642643+PeyTy@users.noreply.github.com> Date: Thu, 4 Jul 2024 00:27:13 +0300 Subject: [PATCH] [C2HEXA] Reserved keywords --- source/toHexa/clang/clangGenerator.hexa | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/toHexa/clang/clangGenerator.hexa b/source/toHexa/clang/clangGenerator.hexa index f3c7f90..fe09b2d 100644 --- a/source/toHexa/clang/clangGenerator.hexa +++ b/source/toHexa/clang/clangGenerator.hexa @@ -91,6 +91,20 @@ class ClangGenerator { // TODO ] + static let reserved = [ + 'class', + 'not', + 'and', + 'or', + 'null', + 'new', + 'interface', + 'type', + 'var', + 'let', + 'fun' + ] + fun desugarKnownType(qualType String) String { let qualType = desugarQualType.get(qualType) ?? qualType let qualType = qualTypeToHexaType.get(qualType) ?? qualType @@ -308,6 +322,7 @@ class ClangGenerator { } return Node.InlineStatements(results) case FieldDecl: + // TODO case BinaryOperator: // TODO better idea var op = Lexer.tokenize(Buffer.from(node.opcode), "TEST").token[0] as! Token