evaluation compiler debug tooltip visualizer

This commit is contained in:
Ryan Fleury
2024-08-13 15:41:01 -07:00
parent c64d207d4d
commit 07c4e6ee87
7 changed files with 204 additions and 29 deletions
+23
View File
@@ -1,6 +1,17 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
@table(name)
E_TokenKindTable:
{
{Null}
{Identifier}
{Numeric}
{StringLiteral}
{CharLiteral}
{Symbol}
}
@table(name basic_string basic_byte_size)
// NOTE(rjf): basic_byte_size == 0xFF? => address sized
E_TypeKindTable:
@@ -131,6 +142,12 @@ E_InterpretationCodeTable:
{ MalformedBytecode "Malformed bytecode." }
}
@enum E_TokenKind:
{
@expand(E_TokenKindTable a) `$(a.name)`,
COUNT,
}
@enum E_TypeKind:
{
@expand(E_TypeKindTable a) `$(a.name)`,
@@ -159,6 +176,12 @@ E_InterpretationCodeTable:
COUNT,
}
@data(String8)
e_token_kind_strings:
{
@expand(E_TokenKindTable a) `str8_lit_comp("$(a.name)")`
}
@data(String8)
e_expr_kind_strings:
{
-12
View File
@@ -44,18 +44,6 @@ struct E_MsgList
////////////////////////////////
//~ rjf: Token Types
typedef enum E_TokenKind
{
E_TokenKind_Null,
E_TokenKind_Identifier,
E_TokenKind_Numeric,
E_TokenKind_StringLiteral,
E_TokenKind_CharLiteral,
E_TokenKind_Symbol,
E_TokenKind_COUNT
}
E_TokenKind;
typedef struct E_Token E_Token;
struct E_Token
{
+10
View File
@@ -4,6 +4,16 @@
//- GENERATED CODE
C_LINKAGE_BEGIN
String8 e_token_kind_strings[6] =
{
str8_lit_comp("Null"),
str8_lit_comp("Identifier"),
str8_lit_comp("Numeric"),
str8_lit_comp("StringLiteral"),
str8_lit_comp("CharLiteral"),
str8_lit_comp("Symbol"),
};
String8 e_expr_kind_strings[41] =
{
str8_lit_comp("Nil"),
+12
View File
@@ -6,6 +6,17 @@
#ifndef EVAL_META_H
#define EVAL_META_H
typedef enum E_TokenKind
{
E_TokenKind_Null,
E_TokenKind_Identifier,
E_TokenKind_Numeric,
E_TokenKind_StringLiteral,
E_TokenKind_CharLiteral,
E_TokenKind_Symbol,
E_TokenKind_COUNT,
} E_TokenKind;
typedef enum E_TypeKind
{
E_TypeKind_Null,
@@ -139,6 +150,7 @@ E_InterpretationCode_COUNT,
} E_InterpretationCode;
C_LINKAGE_BEGIN
extern String8 e_token_kind_strings[6];
extern String8 e_expr_kind_strings[41];
extern String8 e_interpretation_code_display_strings[11];
extern String8 e_expr_op_strings[41];