mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-21 23:12:01 -07:00
first pass of watch window macros; fix active-but-disabled line edit rendering; other minor fixes
This commit is contained in:
+5
-2
@@ -39,16 +39,19 @@ EVAL_ExprKindTable:
|
||||
|
||||
{ Ternary 3 "? " }
|
||||
|
||||
{ LeafBytecode 0 "bytecode" }
|
||||
{ LeafBytecode 0 "bytecode" }
|
||||
{ LeafMember 0 "member" }
|
||||
{ LeafU64 0 "U64" }
|
||||
{ LeafF64 0 "F64" }
|
||||
{ LeafF32 0 "F32" }
|
||||
|
||||
{ TypeIdent 0 "type_ident" }
|
||||
{ TypeIdent 0 "type_ident" }
|
||||
{ Ptr 1 "ptr" }
|
||||
{ Array 2 "array" }
|
||||
{ Func 1 "function" }
|
||||
|
||||
{ Define 2 "=" }
|
||||
{ LeafIdent 0 "leaf_ident" }
|
||||
}
|
||||
|
||||
@table_gen
|
||||
|
||||
+71
-52
@@ -1,44 +1,6 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
////////////////////////////////
|
||||
//~ allen: Eval Errors
|
||||
|
||||
internal void
|
||||
eval_error(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, String8 text){
|
||||
EVAL_Error *error = push_array_no_zero(arena, EVAL_Error, 1);
|
||||
SLLQueuePush(list->first, list->last, error);
|
||||
list->count += 1;
|
||||
list->max_kind = Max(kind, list->max_kind);
|
||||
error->kind = kind;
|
||||
error->location = location;
|
||||
error->text = text;
|
||||
}
|
||||
|
||||
internal void
|
||||
eval_errorf(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, char *fmt, ...){
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
String8 text = push_str8fv(arena, fmt, args);
|
||||
va_end(args);
|
||||
eval_error(arena, list, kind, location, text);
|
||||
}
|
||||
|
||||
internal void
|
||||
eval_error_list_concat_in_place(EVAL_ErrorList *dst, EVAL_ErrorList *to_push){
|
||||
if (dst->last != 0){
|
||||
if (to_push->last != 0){
|
||||
dst->last->next = to_push->first;
|
||||
dst->last = to_push->last;
|
||||
dst->count += to_push->count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
*dst = *to_push;
|
||||
}
|
||||
MemoryZeroStruct(to_push);
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ allen: EVAL Bytecode Helpers
|
||||
|
||||
@@ -284,6 +246,16 @@ eval_expr_leaf_member(Arena *arena, void *location, String8 name){
|
||||
return(result);
|
||||
}
|
||||
|
||||
internal EVAL_Expr*
|
||||
eval_expr_leaf_ident(Arena *arena, void *location, String8 name)
|
||||
{
|
||||
EVAL_Expr *result = push_array(arena, EVAL_Expr, 1);
|
||||
result->location = location;
|
||||
result->kind = EVAL_ExprKind_LeafIdent;
|
||||
result->name = name;
|
||||
return(result);
|
||||
}
|
||||
|
||||
internal EVAL_Expr*
|
||||
eval_expr_leaf_bytecode(Arena *arena, void *location, TG_Key type_key, String8 bytecode, EVAL_EvalMode mode){
|
||||
EVAL_Expr *result = push_array(arena, EVAL_Expr, 1);
|
||||
@@ -717,6 +689,35 @@ eval_irtree_resolve_to_value(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg,
|
||||
////////////////////////////////
|
||||
//~ allen: EVAL Compiler Phases
|
||||
|
||||
internal void
|
||||
eval_push_leaf_ident_exprs_from_expr__in_place(Arena *arena, EVAL_String2ExprMap *map, EVAL_Expr *expr, EVAL_ErrorList *eout)
|
||||
{
|
||||
switch(expr->kind)
|
||||
{
|
||||
default:
|
||||
{
|
||||
U64 children_count = eval_expr_kind_child_counts[expr->kind];
|
||||
for(U64 idx = 0; idx < children_count; idx += 1)
|
||||
{
|
||||
eval_push_leaf_ident_exprs_from_expr__in_place(arena, map, expr->children[idx], eout);
|
||||
}
|
||||
}break;
|
||||
case EVAL_ExprKind_Define:
|
||||
{
|
||||
EVAL_Expr *exprl = expr->children[0];
|
||||
EVAL_Expr *exprr = expr->children[1];
|
||||
if(exprl->kind != EVAL_ExprKind_LeafIdent)
|
||||
{
|
||||
eval_errorf(arena, eout, EVAL_ErrorKind_MalformedInput, expr->location, "Left side of assignment must be an identifier.");
|
||||
}
|
||||
else
|
||||
{
|
||||
eval_string2expr_map_insert(arena, map, exprl->name, exprr);
|
||||
}
|
||||
}break;
|
||||
}
|
||||
}
|
||||
|
||||
internal TG_Key
|
||||
eval_type_from_type_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg, EVAL_Expr *expr, EVAL_ErrorList *eout){
|
||||
TG_Key result = zero_struct;
|
||||
@@ -761,7 +762,7 @@ eval_type_from_type_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg, EVA
|
||||
}
|
||||
|
||||
internal EVAL_IRTreeAndType
|
||||
eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg, EVAL_Expr *expr, EVAL_ErrorList *eout)
|
||||
eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg, EVAL_String2ExprMap *leaf_ident_expr_map, EVAL_Expr *expr, EVAL_ErrorList *eout)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
EVAL_IRTreeAndType result = {0};
|
||||
@@ -780,8 +781,8 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
|
||||
EVAL_Expr *exprl = expr->children[0];
|
||||
EVAL_Expr *exprr = expr->children[1];
|
||||
|
||||
EVAL_IRTreeAndType l = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprl, eout);
|
||||
EVAL_IRTreeAndType r = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprr, eout);
|
||||
EVAL_IRTreeAndType l = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprl, eout);
|
||||
EVAL_IRTreeAndType r = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprr, eout);
|
||||
|
||||
if (l.tree->op != 0 && r.tree->op != 0){
|
||||
TG_Key l_restype = tg_unwrapped_from_graph_raddbg_key(graph, rdbg, l.type_key);
|
||||
@@ -860,7 +861,7 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
|
||||
EVAL_Expr *exprl = expr->children[0];
|
||||
EVAL_Expr *exprr = expr->children[1];
|
||||
|
||||
EVAL_IRTreeAndType l = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprl, eout);
|
||||
EVAL_IRTreeAndType l = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprl, eout);
|
||||
|
||||
if (l.tree->op != 0 && !tg_key_match(tg_key_zero(), l.type_key)){
|
||||
TG_Key l_restype = tg_unwrapped_from_graph_raddbg_key(graph, rdbg, l.type_key);
|
||||
@@ -978,7 +979,7 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
|
||||
{
|
||||
EVAL_Expr *exprc = expr->children[0];
|
||||
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprc, eout);
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprc, eout);
|
||||
|
||||
if (c.tree->op != 0){
|
||||
TG_Key c_restype = tg_unwrapped_from_graph_raddbg_key(graph, rdbg, c.type_key);
|
||||
@@ -1035,7 +1036,7 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
|
||||
case EVAL_ExprKind_Address:
|
||||
{
|
||||
EVAL_Expr *exprc = expr->children[0];
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprc, eout);
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprc, eout);
|
||||
if(c.tree->op != 0 && !tg_key_match(c.type_key, tg_key_zero()))
|
||||
{
|
||||
TG_Key c_restype = tg_unwrapped_from_graph_raddbg_key(graph, rdbg, c.type_key);
|
||||
@@ -1069,7 +1070,7 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
|
||||
|
||||
TG_Key cast_type_key = eval_type_from_type_expr(arena, graph, rdbg, exprl, eout);
|
||||
TG_Kind cast_type_kind = tg_kind_from_key(cast_type_key);
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprr, eout);
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprr, eout);
|
||||
|
||||
if(cast_type_kind != TG_Kind_Null && c.tree->op != 0)
|
||||
{
|
||||
@@ -1135,7 +1136,7 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
|
||||
// size of value expression
|
||||
default:
|
||||
{
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprc, eout);
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprc, eout);
|
||||
type_key = c.type_key;
|
||||
}break;
|
||||
}
|
||||
@@ -1163,7 +1164,7 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
|
||||
{
|
||||
EVAL_Expr *exprc = expr->children[0];
|
||||
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprc, eout);
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprc, eout);
|
||||
if (c.tree->op != 0){
|
||||
TG_Key c_restype = tg_unwrapped_from_graph_raddbg_key(graph, rdbg, c.type_key);
|
||||
TG_Key p_type = eval_type_promote(graph, rdbg, c_restype);
|
||||
@@ -1217,8 +1218,8 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
|
||||
EVAL_Expr *exprl = expr->children[0];
|
||||
EVAL_Expr *exprr = expr->children[1];
|
||||
|
||||
EVAL_IRTreeAndType l = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprl, eout);
|
||||
EVAL_IRTreeAndType r = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprr, eout);
|
||||
EVAL_IRTreeAndType l = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprl, eout);
|
||||
EVAL_IRTreeAndType r = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprr, eout);
|
||||
|
||||
if (l.tree->op != 0 && r.tree->op != 0){
|
||||
TG_Key l_restype = tg_unwrapped_from_graph_raddbg_key(graph, rdbg, l.type_key);
|
||||
@@ -1407,9 +1408,9 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
|
||||
EVAL_Expr *exprl = expr->children[1];
|
||||
EVAL_Expr *exprr = expr->children[2];
|
||||
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprc, eout);
|
||||
EVAL_IRTreeAndType l = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprl, eout);
|
||||
EVAL_IRTreeAndType r = eval_irtree_and_type_from_expr(arena, graph, rdbg, exprr, eout);
|
||||
EVAL_IRTreeAndType c = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprc, eout);
|
||||
EVAL_IRTreeAndType l = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprl, eout);
|
||||
EVAL_IRTreeAndType r = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, exprr, eout);
|
||||
|
||||
if (l.tree->op != 0 && r.tree->op != 0 && c.tree->op != 0){
|
||||
|
||||
@@ -1536,6 +1537,24 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
|
||||
{
|
||||
eval_errorf(arena, eout, EVAL_ErrorKind_MalformedInput, expr->location, "Type expression not expected.");
|
||||
}break;
|
||||
|
||||
case EVAL_ExprKind_Define:
|
||||
{
|
||||
result = eval_irtree_and_type_from_expr(arena, graph, rdbg, leaf_ident_expr_map, expr->children[1], eout);
|
||||
}break;
|
||||
case EVAL_ExprKind_LeafIdent:
|
||||
{
|
||||
String8 name = expr->name;
|
||||
EVAL_Expr *leaf_ident_expr = eval_expr_from_string(leaf_ident_expr_map, name);
|
||||
if(leaf_ident_expr == &eval_expr_nil)
|
||||
{
|
||||
eval_errorf(arena, eout, EVAL_ErrorKind_ResolutionFailure, expr->location, "\"%S\" could not be found.", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = eval_irtree_and_type_from_expr(arena, graph, rdbg, &eval_string2expr_map_nil, leaf_ident_expr, eout);
|
||||
}
|
||||
}break;
|
||||
}
|
||||
|
||||
ProfEnd();
|
||||
|
||||
+3
-124
@@ -4,129 +4,6 @@
|
||||
#ifndef EVAL_COMPILER_H
|
||||
#define EVAL_COMPILER_H
|
||||
|
||||
////////////////////////////////
|
||||
//~ allen: EVAL Error Types
|
||||
|
||||
typedef enum EVAL_ErrorKind
|
||||
{
|
||||
EVAL_ErrorKind_Null,
|
||||
EVAL_ErrorKind_MalformedInput,
|
||||
EVAL_ErrorKind_MissingInfo,
|
||||
EVAL_ErrorKind_ResolutionFailure,
|
||||
EVAL_ErrorKind_COUNT
|
||||
}
|
||||
EVAL_ErrorKind;
|
||||
|
||||
typedef struct EVAL_Error EVAL_Error;
|
||||
struct EVAL_Error{
|
||||
EVAL_Error *next;
|
||||
EVAL_ErrorKind kind;
|
||||
void *location;
|
||||
String8 text;
|
||||
};
|
||||
|
||||
typedef struct EVAL_ErrorList EVAL_ErrorList;
|
||||
struct EVAL_ErrorList{
|
||||
EVAL_Error *first;
|
||||
EVAL_Error *last;
|
||||
EVAL_ErrorKind max_kind;
|
||||
U64 count;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ allen: EVAL Op List Types
|
||||
|
||||
enum{
|
||||
EVAL_IRExtKind_Bytecode = RADDBG_EvalOp_COUNT,
|
||||
EVAL_IRExtKind_COUNT
|
||||
};
|
||||
|
||||
typedef struct EVAL_Op EVAL_Op;
|
||||
struct EVAL_Op{
|
||||
EVAL_Op *next;
|
||||
RADDBG_EvalOp opcode;
|
||||
union{
|
||||
U64 p;
|
||||
String8 bytecode;
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct EVAL_OpList EVAL_OpList;
|
||||
struct EVAL_OpList{
|
||||
EVAL_Op *first_op;
|
||||
EVAL_Op *last_op;
|
||||
U32 op_count;
|
||||
U32 encoded_size;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//- allen: EVAL Expression Types
|
||||
|
||||
#include "eval/generated/eval.meta.h"
|
||||
|
||||
typedef enum EVAL_EvalMode{
|
||||
EVAL_EvalMode_NULL,
|
||||
EVAL_EvalMode_Value,
|
||||
EVAL_EvalMode_Addr,
|
||||
EVAL_EvalMode_Reg
|
||||
}
|
||||
EVAL_EvalMode;
|
||||
|
||||
typedef struct EVAL_Expr EVAL_Expr;
|
||||
struct EVAL_Expr{
|
||||
EVAL_ExprKind kind;
|
||||
void *location;
|
||||
union{
|
||||
EVAL_Expr *children[3];
|
||||
U32 u32;
|
||||
U64 u64;
|
||||
F32 f32;
|
||||
F64 f64;
|
||||
struct{
|
||||
EVAL_Expr *child;
|
||||
U64 u64;
|
||||
} child_and_constant;
|
||||
String8 name;
|
||||
struct{
|
||||
TG_Key type_key;
|
||||
String8 bytecode;
|
||||
EVAL_EvalMode mode;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
global read_only EVAL_Expr eval_expr_nil = {0};
|
||||
|
||||
////////////////////////////////
|
||||
//~ allen: EVAL Compiler Types
|
||||
|
||||
typedef struct EVAL_IRTree EVAL_IRTree;
|
||||
struct EVAL_IRTree{
|
||||
RADDBG_EvalOp op;
|
||||
EVAL_IRTree *children[3];
|
||||
union{
|
||||
U64 p;
|
||||
String8 bytecode;
|
||||
};
|
||||
};
|
||||
|
||||
global read_only EVAL_IRTree eval_irtree_nil = {0};
|
||||
|
||||
typedef struct EVAL_IRTreeAndType EVAL_IRTreeAndType;
|
||||
struct EVAL_IRTreeAndType{
|
||||
EVAL_IRTree *tree;
|
||||
TG_Key type_key;
|
||||
EVAL_EvalMode mode;
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
//~ allen: Eval Error Helpers
|
||||
|
||||
internal void eval_error(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, String8 text);
|
||||
internal void eval_errorf(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, char *fmt, ...);
|
||||
internal void eval_error_list_concat_in_place(EVAL_ErrorList *dst, EVAL_ErrorList *to_push);
|
||||
|
||||
////////////////////////////////
|
||||
//~ allen: EVAL Bytecode Helpers
|
||||
|
||||
@@ -155,6 +32,7 @@ internal EVAL_Expr* eval_expr_f64(Arena *arena, void *location, F64 f64);
|
||||
internal EVAL_Expr* eval_expr_f32(Arena *arena, void *location, F32 f32);
|
||||
internal EVAL_Expr* eval_expr_child_and_u64(Arena *arena, EVAL_ExprKind kind, void *location, EVAL_Expr *child, U64 u64);
|
||||
internal EVAL_Expr* eval_expr_leaf_member(Arena *arena, void *location, String8 name);
|
||||
internal EVAL_Expr* eval_expr_leaf_ident(Arena *arena, void *location, String8 name);
|
||||
internal EVAL_Expr* eval_expr_leaf_bytecode(Arena *arena, void *location, TG_Key type_key, String8 bytecode, EVAL_EvalMode mode);
|
||||
internal EVAL_Expr* eval_expr_leaf_op_list(Arena *arena, void *location, TG_Key type_key, EVAL_OpList *ops, EVAL_EvalMode mode);
|
||||
internal EVAL_Expr* eval_expr_leaf_type(Arena *arena, void *location, TG_Key type_key);
|
||||
@@ -196,8 +74,9 @@ internal EVAL_IRTree* eval_irtree_resolve_to_value(Arena *arena, TG_Graph *graph
|
||||
////////////////////////////////
|
||||
//~ allen: EVAL Compiler Phases
|
||||
|
||||
internal void eval_push_leaf_ident_exprs_from_expr__in_place(Arena *arena, EVAL_String2ExprMap *map, EVAL_Expr *expr, EVAL_ErrorList *eout);
|
||||
internal TG_Key eval_type_from_type_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg, EVAL_Expr *expr, EVAL_ErrorList *eout);
|
||||
internal EVAL_IRTreeAndType eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg, EVAL_Expr *expr, EVAL_ErrorList *eout);
|
||||
internal EVAL_IRTreeAndType eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg, EVAL_String2ExprMap *leaf_ident_expr_map, EVAL_Expr *expr, EVAL_ErrorList *eout);
|
||||
internal void eval_oplist_from_irtree(Arena *arena, EVAL_IRTree *tree, EVAL_OpList *out);
|
||||
|
||||
#endif //EVAL_COMPILER_H
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Basic Functions
|
||||
|
||||
internal U64
|
||||
eval_hash_from_string(String8 string)
|
||||
{
|
||||
U64 result = 5381;
|
||||
for(U64 i = 0; i < string.size; i += 1)
|
||||
{
|
||||
result = ((result << 5) + result) + string.str[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Error List Building Functions
|
||||
|
||||
internal void
|
||||
eval_error(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, String8 text){
|
||||
EVAL_Error *error = push_array_no_zero(arena, EVAL_Error, 1);
|
||||
SLLQueuePush(list->first, list->last, error);
|
||||
list->count += 1;
|
||||
list->max_kind = Max(kind, list->max_kind);
|
||||
error->kind = kind;
|
||||
error->location = location;
|
||||
error->text = text;
|
||||
}
|
||||
|
||||
internal void
|
||||
eval_errorf(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, char *fmt, ...){
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
String8 text = push_str8fv(arena, fmt, args);
|
||||
va_end(args);
|
||||
eval_error(arena, list, kind, location, text);
|
||||
}
|
||||
|
||||
internal void
|
||||
eval_error_list_concat_in_place(EVAL_ErrorList *dst, EVAL_ErrorList *to_push){
|
||||
if (dst->last != 0){
|
||||
if (to_push->last != 0){
|
||||
dst->last->next = to_push->first;
|
||||
dst->last = to_push->last;
|
||||
dst->count += to_push->count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
*dst = *to_push;
|
||||
}
|
||||
MemoryZeroStruct(to_push);
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Map Functions
|
||||
|
||||
//- rjf: string -> num
|
||||
|
||||
internal EVAL_String2NumMap
|
||||
eval_string2num_map_make(Arena *arena, U64 slot_count)
|
||||
{
|
||||
EVAL_String2NumMap map = {0};
|
||||
map.slots_count = slot_count;
|
||||
map.slots = push_array(arena, EVAL_String2NumMapSlot, map.slots_count);
|
||||
return map;
|
||||
}
|
||||
|
||||
internal void
|
||||
eval_string2num_map_insert(Arena *arena, EVAL_String2NumMap *map, String8 string, U64 num)
|
||||
{
|
||||
U64 hash = eval_hash_from_string(string);
|
||||
U64 slot_idx = hash%map->slots_count;
|
||||
EVAL_String2NumMapNode *existing_node = 0;
|
||||
for(EVAL_String2NumMapNode *node = map->slots[slot_idx].first; node != 0; node = node->hash_next)
|
||||
{
|
||||
if(str8_match(node->string, string, 0) && node->num == num)
|
||||
{
|
||||
existing_node = node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(existing_node == 0)
|
||||
{
|
||||
EVAL_String2NumMapNode *node = push_array(arena, EVAL_String2NumMapNode, 1);
|
||||
SLLQueuePush_N(map->slots[slot_idx].first, map->slots[slot_idx].last, node, hash_next);
|
||||
SLLQueuePush_N(map->first, map->last, node, order_next);
|
||||
node->string = push_str8_copy(arena, string);
|
||||
node->num = num;
|
||||
}
|
||||
}
|
||||
|
||||
internal U64
|
||||
eval_num_from_string(EVAL_String2NumMap *map, String8 string)
|
||||
{
|
||||
U64 num = 0;
|
||||
if(map->slots_count != 0)
|
||||
{
|
||||
U64 hash = eval_hash_from_string(string);
|
||||
U64 slot_idx = hash%map->slots_count;
|
||||
EVAL_String2NumMapNode *existing_node = 0;
|
||||
for(EVAL_String2NumMapNode *node = map->slots[slot_idx].first; node != 0; node = node->hash_next)
|
||||
{
|
||||
if(str8_match(node->string, string, 0))
|
||||
{
|
||||
existing_node = node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(existing_node != 0)
|
||||
{
|
||||
num = existing_node->num;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
//- rjf: string -> expr
|
||||
|
||||
internal EVAL_String2ExprMap
|
||||
eval_string2expr_map_make(Arena *arena, U64 slot_count)
|
||||
{
|
||||
EVAL_String2ExprMap map = {0};
|
||||
map.slots_count = slot_count;
|
||||
map.slots = push_array(arena, EVAL_String2ExprMapSlot, map.slots_count);
|
||||
return map;
|
||||
}
|
||||
|
||||
internal void
|
||||
eval_string2expr_map_insert(Arena *arena, EVAL_String2ExprMap *map, String8 string, EVAL_Expr *expr)
|
||||
{
|
||||
U64 hash = eval_hash_from_string(string);
|
||||
U64 slot_idx = hash%map->slots_count;
|
||||
EVAL_String2ExprMapNode *existing_node = 0;
|
||||
for(EVAL_String2ExprMapNode *node = map->slots[slot_idx].first;
|
||||
node != 0;
|
||||
node = node->hash_next)
|
||||
{
|
||||
if(str8_match(node->string, string, 0))
|
||||
{
|
||||
existing_node = node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(existing_node == 0)
|
||||
{
|
||||
EVAL_String2ExprMapNode *node = push_array(arena, EVAL_String2ExprMapNode, 1);
|
||||
SLLQueuePush_N(map->slots[slot_idx].first, map->slots[slot_idx].last, node, hash_next);
|
||||
node->string = push_str8_copy(arena, string);
|
||||
existing_node = node;
|
||||
}
|
||||
existing_node->expr = expr;
|
||||
}
|
||||
|
||||
internal EVAL_Expr *
|
||||
eval_expr_from_string(EVAL_String2ExprMap *map, String8 string)
|
||||
{
|
||||
EVAL_Expr *expr = &eval_expr_nil;
|
||||
if(map->slots_count != 0)
|
||||
{
|
||||
U64 hash = eval_hash_from_string(string);
|
||||
U64 slot_idx = hash%map->slots_count;
|
||||
EVAL_String2ExprMapNode *existing_node = 0;
|
||||
for(EVAL_String2ExprMapNode *node = map->slots[slot_idx].first; node != 0; node = node->hash_next)
|
||||
{
|
||||
if(str8_match(node->string, string, 0))
|
||||
{
|
||||
existing_node = node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(existing_node != 0)
|
||||
{
|
||||
expr = existing_node->expr;
|
||||
}
|
||||
}
|
||||
return expr;
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#ifndef EVAL_CORE_H
|
||||
#define EVAL_CORE_H
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Errors
|
||||
|
||||
typedef enum EVAL_ErrorKind
|
||||
{
|
||||
EVAL_ErrorKind_Null,
|
||||
EVAL_ErrorKind_MalformedInput,
|
||||
EVAL_ErrorKind_MissingInfo,
|
||||
EVAL_ErrorKind_ResolutionFailure,
|
||||
EVAL_ErrorKind_COUNT
|
||||
}
|
||||
EVAL_ErrorKind;
|
||||
|
||||
typedef struct EVAL_Error EVAL_Error;
|
||||
struct EVAL_Error
|
||||
{
|
||||
EVAL_Error *next;
|
||||
EVAL_ErrorKind kind;
|
||||
void *location;
|
||||
String8 text;
|
||||
};
|
||||
|
||||
typedef struct EVAL_ErrorList EVAL_ErrorList;
|
||||
struct EVAL_ErrorList
|
||||
{
|
||||
EVAL_Error *first;
|
||||
EVAL_Error *last;
|
||||
EVAL_ErrorKind max_kind;
|
||||
U64 count;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Operation Types
|
||||
|
||||
enum
|
||||
{
|
||||
EVAL_IRExtKind_Bytecode = RADDBG_EvalOp_COUNT,
|
||||
EVAL_IRExtKind_COUNT
|
||||
};
|
||||
|
||||
typedef struct EVAL_Op EVAL_Op;
|
||||
struct EVAL_Op
|
||||
{
|
||||
EVAL_Op *next;
|
||||
RADDBG_EvalOp opcode;
|
||||
union
|
||||
{
|
||||
U64 p;
|
||||
String8 bytecode;
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct EVAL_OpList EVAL_OpList;
|
||||
struct EVAL_OpList
|
||||
{
|
||||
EVAL_Op *first_op;
|
||||
EVAL_Op *last_op;
|
||||
U32 op_count;
|
||||
U32 encoded_size;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Generated Code
|
||||
|
||||
#include "eval/generated/eval.meta.h"
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Expression Tree Types
|
||||
|
||||
typedef enum EVAL_EvalMode
|
||||
{
|
||||
EVAL_EvalMode_NULL,
|
||||
EVAL_EvalMode_Value,
|
||||
EVAL_EvalMode_Addr,
|
||||
EVAL_EvalMode_Reg
|
||||
}
|
||||
EVAL_EvalMode;
|
||||
|
||||
typedef struct EVAL_Expr EVAL_Expr;
|
||||
struct EVAL_Expr
|
||||
{
|
||||
EVAL_ExprKind kind;
|
||||
void *location;
|
||||
union
|
||||
{
|
||||
EVAL_Expr *children[3];
|
||||
U32 u32;
|
||||
U64 u64;
|
||||
F32 f32;
|
||||
F64 f64;
|
||||
struct
|
||||
{
|
||||
EVAL_Expr *child;
|
||||
U64 u64;
|
||||
} child_and_constant;
|
||||
String8 name;
|
||||
struct
|
||||
{
|
||||
TG_Key type_key;
|
||||
String8 bytecode;
|
||||
EVAL_EvalMode mode;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: IR Tree Types
|
||||
|
||||
typedef struct EVAL_IRTree EVAL_IRTree;
|
||||
struct EVAL_IRTree{
|
||||
RADDBG_EvalOp op;
|
||||
EVAL_IRTree *children[3];
|
||||
union{
|
||||
U64 p;
|
||||
String8 bytecode;
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct EVAL_IRTreeAndType EVAL_IRTreeAndType;
|
||||
struct EVAL_IRTreeAndType{
|
||||
EVAL_IRTree *tree;
|
||||
TG_Key type_key;
|
||||
EVAL_EvalMode mode;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Map Types
|
||||
|
||||
//- rjf: string -> num
|
||||
|
||||
typedef struct EVAL_String2NumMapNode EVAL_String2NumMapNode;
|
||||
struct EVAL_String2NumMapNode
|
||||
{
|
||||
EVAL_String2NumMapNode *order_next;
|
||||
EVAL_String2NumMapNode *hash_next;
|
||||
String8 string;
|
||||
U64 num;
|
||||
};
|
||||
|
||||
typedef struct EVAL_String2NumMapSlot EVAL_String2NumMapSlot;
|
||||
struct EVAL_String2NumMapSlot
|
||||
{
|
||||
EVAL_String2NumMapNode *first;
|
||||
EVAL_String2NumMapNode *last;
|
||||
};
|
||||
|
||||
typedef struct EVAL_String2NumMap EVAL_String2NumMap;
|
||||
struct EVAL_String2NumMap
|
||||
{
|
||||
U64 slots_count;
|
||||
EVAL_String2NumMapSlot *slots;
|
||||
EVAL_String2NumMapNode *first;
|
||||
EVAL_String2NumMapNode *last;
|
||||
};
|
||||
|
||||
//- rjf: string -> expr
|
||||
|
||||
typedef struct EVAL_String2ExprMapNode EVAL_String2ExprMapNode;
|
||||
struct EVAL_String2ExprMapNode
|
||||
{
|
||||
EVAL_String2ExprMapNode *hash_next;
|
||||
String8 string;
|
||||
EVAL_Expr *expr;
|
||||
};
|
||||
|
||||
typedef struct EVAL_String2ExprMapSlot EVAL_String2ExprMapSlot;
|
||||
struct EVAL_String2ExprMapSlot
|
||||
{
|
||||
EVAL_String2ExprMapNode *first;
|
||||
EVAL_String2ExprMapNode *last;
|
||||
};
|
||||
|
||||
typedef struct EVAL_String2ExprMap EVAL_String2ExprMap;
|
||||
struct EVAL_String2ExprMap
|
||||
{
|
||||
U64 slots_count;
|
||||
EVAL_String2ExprMapSlot *slots;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Globals
|
||||
|
||||
global read_only EVAL_Expr eval_expr_nil = {0};
|
||||
global read_only EVAL_IRTree eval_irtree_nil = {0};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Basic Functions
|
||||
|
||||
internal U64 eval_hash_from_string(String8 string);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Error List Building Functions
|
||||
|
||||
internal void eval_error(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, String8 text);
|
||||
internal void eval_errorf(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, char *fmt, ...);
|
||||
internal void eval_error_list_concat_in_place(EVAL_ErrorList *dst, EVAL_ErrorList *to_push);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Map Functions
|
||||
|
||||
//- rjf: string -> num
|
||||
internal EVAL_String2NumMap eval_string2num_map_make(Arena *arena, U64 slot_count);
|
||||
internal void eval_string2num_map_insert(Arena *arena, EVAL_String2NumMap *map, String8 string, U64 num);
|
||||
internal U64 eval_num_from_string(EVAL_String2NumMap *map, String8 string);
|
||||
|
||||
//- rjf: string -> expr
|
||||
internal EVAL_String2ExprMap eval_string2expr_map_make(Arena *arena, U64 slot_count);
|
||||
internal void eval_string2expr_map_insert(Arena *arena, EVAL_String2NumMap *map, String8 string, EVAL_Expr *expr);
|
||||
internal EVAL_Expr *eval_expr_from_string(EVAL_String2ExprMap *map, String8 string);
|
||||
|
||||
#endif // EVAL_CORE_H
|
||||
@@ -0,0 +1,7 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#include "eval/eval_core.c"
|
||||
#include "eval/eval_compiler.c"
|
||||
#include "eval/eval_machine.c"
|
||||
#include "eval/eval_parser.c"
|
||||
@@ -0,0 +1,12 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#ifndef EVAL_INC_H
|
||||
#define EVAL_INC_H
|
||||
|
||||
#include "eval/eval_core.h"
|
||||
#include "eval/eval_compiler.h"
|
||||
#include "eval/eval_machine.h"
|
||||
#include "eval/eval_parser.h"
|
||||
|
||||
#endif // EVAL_INC_H
|
||||
+4
-78
@@ -48,85 +48,11 @@ global read_only struct {EVAL_ExprKind kind; String8 string; S64 precedence;} ev
|
||||
{ EVAL_ExprKind_BitOr, str8_lit_comp("|"), 10 },
|
||||
{ EVAL_ExprKind_LogAnd, str8_lit_comp("&&"), 11 },
|
||||
{ EVAL_ExprKind_LogOr, str8_lit_comp("||"), 12 },
|
||||
{ EVAL_ExprKind_Define, str8_lit_comp("="), 13 },
|
||||
};
|
||||
|
||||
global read_only S64 eval_g_max_precedence = 15;
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Basic Functions
|
||||
|
||||
internal U64
|
||||
eval_hash_from_string(String8 string)
|
||||
{
|
||||
U64 result = 5381;
|
||||
for(U64 i = 0; i < string.size; i += 1)
|
||||
{
|
||||
result = ((result << 5) + result) + string.str[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Map Functions
|
||||
|
||||
internal EVAL_String2NumMap
|
||||
eval_string2num_map_make(Arena *arena, U64 slot_count)
|
||||
{
|
||||
EVAL_String2NumMap map = {0};
|
||||
map.slots_count = slot_count;
|
||||
map.slots = push_array(arena, EVAL_String2NumMapSlot, map.slots_count);
|
||||
return map;
|
||||
}
|
||||
|
||||
internal void
|
||||
eval_string2num_map_insert(Arena *arena, EVAL_String2NumMap *map, String8 string, U64 num)
|
||||
{
|
||||
U64 hash = eval_hash_from_string(string);
|
||||
U64 slot_idx = hash%map->slots_count;
|
||||
EVAL_String2NumMapNode *existing_node = 0;
|
||||
for(EVAL_String2NumMapNode *node = map->slots[slot_idx].first; node != 0; node = node->hash_next)
|
||||
{
|
||||
if(str8_match(node->string, string, 0) && node->num == num)
|
||||
{
|
||||
existing_node = node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(existing_node == 0)
|
||||
{
|
||||
EVAL_String2NumMapNode *node = push_array(arena, EVAL_String2NumMapNode, 1);
|
||||
SLLQueuePush_N(map->slots[slot_idx].first, map->slots[slot_idx].last, node, hash_next);
|
||||
SLLQueuePush_N(map->first, map->last, node, order_next);
|
||||
node->string = push_str8_copy(arena, string);
|
||||
node->num = num;
|
||||
}
|
||||
}
|
||||
|
||||
internal U64
|
||||
eval_num_from_string(EVAL_String2NumMap *map, String8 string)
|
||||
{
|
||||
U64 num = 0;
|
||||
if(map->slots_count != 0)
|
||||
{
|
||||
U64 hash = eval_hash_from_string(string);
|
||||
U64 slot_idx = hash%map->slots_count;
|
||||
EVAL_String2NumMapNode *existing_node = 0;
|
||||
for(EVAL_String2NumMapNode *node = map->slots[slot_idx].first; node != 0; node = node->hash_next)
|
||||
{
|
||||
if(str8_match(node->string, string, 0))
|
||||
{
|
||||
existing_node = node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(existing_node != 0)
|
||||
{
|
||||
num = existing_node->num;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Map Building Fast Paths
|
||||
|
||||
@@ -1210,10 +1136,10 @@ eval_parse_expr_from_text_tokens__prec(Arena *arena, EVAL_ParseCtx *ctx, String8
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: error on map failure
|
||||
if(mapped_identifier == 0)
|
||||
//- rjf: map failure -> attach as leaf identifier, to be resolved later
|
||||
if(!mapped_identifier)
|
||||
{
|
||||
eval_errorf(arena, &result.errors, EVAL_ErrorKind_ResolutionFailure, token_string.str, "Unknown identifier \"%S\".", token_string);
|
||||
atom = eval_expr_leaf_ident(arena, token_string.str, token_string);
|
||||
it += 1;
|
||||
}
|
||||
}break;
|
||||
|
||||
+4
-43
@@ -1,36 +1,8 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#ifndef EVAL2_PARSER_H
|
||||
#define EVAL2_PARSER_H
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Maps
|
||||
|
||||
typedef struct EVAL_String2NumMapNode EVAL_String2NumMapNode;
|
||||
struct EVAL_String2NumMapNode
|
||||
{
|
||||
EVAL_String2NumMapNode *order_next;
|
||||
EVAL_String2NumMapNode *hash_next;
|
||||
String8 string;
|
||||
U64 num;
|
||||
};
|
||||
|
||||
typedef struct EVAL_String2NumMapSlot EVAL_String2NumMapSlot;
|
||||
struct EVAL_String2NumMapSlot
|
||||
{
|
||||
EVAL_String2NumMapNode *first;
|
||||
EVAL_String2NumMapNode *last;
|
||||
};
|
||||
|
||||
typedef struct EVAL_String2NumMap EVAL_String2NumMap;
|
||||
struct EVAL_String2NumMap
|
||||
{
|
||||
U64 slots_count;
|
||||
EVAL_String2NumMapSlot *slots;
|
||||
EVAL_String2NumMapNode *first;
|
||||
EVAL_String2NumMapNode *last;
|
||||
};
|
||||
#ifndef EVAL_PARSER_H
|
||||
#define EVAL_PARSER_H
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Token Types
|
||||
@@ -107,20 +79,9 @@ struct EVAL_ParseCtx
|
||||
//~ rjf: Globals
|
||||
|
||||
read_only global EVAL_String2NumMap eval_string2num_map_nil = {0};
|
||||
read_only global EVAL_String2ExprMap eval_string2expr_map_nil = {0};
|
||||
global read_only EVAL_ParseResult eval_parse_result_nil = {0, &eval_expr_nil};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Basic Functions
|
||||
|
||||
internal U64 eval_hash_from_string(String8 string);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Map Functions
|
||||
|
||||
internal EVAL_String2NumMap eval_string2num_map_make(Arena *arena, U64 slot_count);
|
||||
internal void eval_string2num_map_insert(Arena *arena, EVAL_String2NumMap *map, String8 string, U64 num);
|
||||
internal U64 eval_num_from_string(EVAL_String2NumMap *map, String8 string);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Debug-Info-Driven Map Building Fast Paths
|
||||
|
||||
@@ -145,4 +106,4 @@ internal EVAL_ParseResult eval_parse_type_from_text_tokens(Arena *arena, EVAL_Pa
|
||||
internal EVAL_ParseResult eval_parse_expr_from_text_tokens__prec(Arena *arena, EVAL_ParseCtx *ctx, String8 text, EVAL_TokenArray *tokens, S64 max_precedence);
|
||||
internal EVAL_ParseResult eval_parse_expr_from_text_tokens(Arena *arena, EVAL_ParseCtx *ctx, String8 text, EVAL_TokenArray *tokens);
|
||||
|
||||
#endif // EVAL2_PARSER_H
|
||||
#endif // EVAL_PARSER_H
|
||||
|
||||
@@ -46,6 +46,8 @@ EVAL_ExprKind_TypeIdent,
|
||||
EVAL_ExprKind_Ptr,
|
||||
EVAL_ExprKind_Array,
|
||||
EVAL_ExprKind_Func,
|
||||
EVAL_ExprKind_Define,
|
||||
EVAL_ExprKind_LeafIdent,
|
||||
EVAL_ExprKind_COUNT
|
||||
};
|
||||
|
||||
@@ -88,6 +90,8 @@ U8 eval_expr_kind_child_counts[] =
|
||||
1,
|
||||
2,
|
||||
1,
|
||||
2,
|
||||
0,
|
||||
};
|
||||
|
||||
String8 eval_expr_kind_strings[] =
|
||||
@@ -129,6 +133,8 @@ str8_lit_comp("TypeIdent"),
|
||||
str8_lit_comp("Ptr"),
|
||||
str8_lit_comp("Array"),
|
||||
str8_lit_comp("Func"),
|
||||
str8_lit_comp("Define"),
|
||||
str8_lit_comp("LeafIdent"),
|
||||
};
|
||||
|
||||
String8 eval_expr_op_strings[] =
|
||||
@@ -170,6 +176,8 @@ str8_lit_comp("type_ident"),
|
||||
str8_lit_comp("ptr"),
|
||||
str8_lit_comp("array"),
|
||||
str8_lit_comp("function"),
|
||||
str8_lit_comp("="),
|
||||
str8_lit_comp("leaf_ident"),
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user