// Copyright (c) 2024 Epic Games Tools // Licensed under the MIT license (https://opensource.org/license/mit/) @table(name basic_string basic_byte_size) // NOTE(rjf): basic_byte_size == 0xFF? => address sized E_TypeKindTable: { {Null "" 0 } {Void "void" 0 } {Handle "HANDLE" 0xFF } {Char8 "char8" 1 } {Char16 "char16" 2 } {Char32 "char32" 4 } {UChar8 "uchar8" 1 } {UChar16 "uchar16" 2 } {UChar32 "uchar32" 4 } {U8 "U8" 1 } {U16 "U16" 2 } {U32 "U32" 4 } {U64 "U64" 8 } {U128 "U128" 16 } {U256 "U256" 32 } {U512 "U512" 64 } {S8 "S8" 1 } {S16 "S16" 2 } {S32 "S32" 4 } {S64 "S64" 8 } {S128 "S128" 16 } {S256 "S256" 32 } {S512 "S512" 64 } {Bool "bool" 1 } {F16 "F16" 2 } {F32 "F32" 4 } {F32PP "F32PP" 4 } {F48 "F48" 6 } {F64 "F64" 8 } {F80 "F80" 10 } {F128 "F128" 16 } {ComplexF32 "ComplexF32" 8 } {ComplexF64 "ComplexF64" 16 } {ComplexF80 "ComplexF80" 20 } {ComplexF128 "ComplexF128" 32 } {Modifier "" 0 } {Ptr "" 0 } {LRef "" 0 } {RRef "" 0 } {Array "" 0 } {Function "" 0 } {Method "" 0 } {MemberPtr "" 0 } {Struct "struct" 0 } {Class "class" 0 } {Union "union" 0 } {Enum "enum" 0 } {Alias "typedef" 0 } {IncompleteStruct "struct" 0 } {IncompleteUnion "union" 0 } {IncompleteClass "class" 0 } {IncompleteEnum "enum" 0 } {Bitfield "" 0 } {Variadic "" 0 } } @table(name op_string) E_ExprKindTable: { { Nil "" } { ArrayIndex "[]" } { MemberAccess "." } { Deref "*" } { Address "&" } { Cast "cast" } { Sizeof "sizeof" } { Neg "-" } { LogNot "!" } { BitNot "~" } { Mul "*" } { Div "/" } { Mod "%" } { Add "+" } { Sub "-" } { LShift "<<" } { RShift ">>" } { Less "<" } { LsEq "<=" } { Grtr ">" } { GrEq ">=" } { EqEq "==" } { NtEq "!=" } { BitAnd "&" } { BitXor "^" } { BitOr "|" } { LogAnd "&&" } { LogOr "||" } { Ternary "? " } { LeafBytecode "bytecode" } { LeafMember "member" } { LeafStringLiteral "string_literal" } { LeafU64 "U64" } { LeafF64 "F64" } { LeafF32 "F32" } { TypeIdent "type_ident" } { Ptr "ptr" } { Array "array" } { Func "function" } { Define "=" } { LeafIdent "leaf_ident" } } @table(name display_string) E_InterpretationCodeTable: { { Good "" } { DivideByZero "Cannot divide by zero." } { BadOp "Invalid operation." } { BadOpTypes "Invalid operation types." } { BadMemRead "Failed memory read." } { BadRegRead "Failed register read." } { BadFrameBase "Invalid frame base address." } { BadModuleBase "Invalid module base address." } { BadTLSBase "Invalid thread-local storage base address." } { InsufficientStackSpace "Insufficient evaluation machine stack space." } { MalformedBytecode "Malformed bytecode." } } @enum E_TypeKind: { @expand(E_TypeKindTable a) `$(a.name)`, COUNT, `FirstBasic = E_TypeKind_Void`, `LastBasic = E_TypeKind_ComplexF128`, `FirstInteger = E_TypeKind_Char8`, `LastInteger = E_TypeKind_S512`, `FirstSigned1 = E_TypeKind_Char8`, `LastSigned1 = E_TypeKind_Char32`, `FirstSigned2 = E_TypeKind_S8`, `LastSigned2 = E_TypeKind_S512`, `FirstIncomplete = E_TypeKind_IncompleteStruct`, `LastIncomplete = E_TypeKind_IncompleteEnum`, } @enum(U32) E_ExprKind: { @expand(E_ExprKindTable a) `$(a.name)`, COUNT, } @enum E_InterpretationCode: { @expand(E_InterpretationCodeTable a) `$(a.name)`, COUNT, } @data(String8) e_expr_kind_strings: { @expand(E_ExprKindTable a) `str8_lit_comp("$(a.name)")` } @data(String8) e_interpretation_code_display_strings: { @expand(E_InterpretationCodeTable a) `str8_lit_comp("$(a.display_string)")` } @data(String8) e_expr_op_strings: { @expand(E_ExprKindTable a) `str8_lit_comp("$(a.op_string)")` } @data(U8) e_kind_basic_byte_size_table: { @expand(E_TypeKindTable a) `$(a.basic_byte_size)`; } @data(String8) e_kind_basic_string_table: { @expand(E_TypeKindTable a) `str8_lit_comp("$(a.basic_string)")`; }