| 83 | }; |
| 84 | |
| 85 | static struct token *new_token(const tal_t *ctx, enum token_type token_type, |
| 86 | size_t script_index) |
| 87 | { |
| 88 | struct token *token = tal(ctx, struct token); |
| 89 | |
| 90 | token->type = token_type; |
| 91 | token->script_index = script_index; |
| 92 | token->c = 0; |
| 93 | token->str = NULL; |
| 94 | token->ppm = 0; |
| 95 | token->amount_sat = AMOUNT_SAT(0); |
| 96 | token->node_id = NULL; |
| 97 | token->chan_id = NULL; |
| 98 | token->left = NULL; |
| 99 | token->middle = NULL; |
| 100 | token->right = NULL; |
| 101 | token->flags = 0; |
| 102 | |
| 103 | return token; |
| 104 | } |
| 105 | |
| 106 | #if SCRIPT_DUMP_TOKENS || SCRIPT_DUMP_SEGMENTS |
| 107 | static const char *token_type_str(enum token_type type) |
no outgoing calls
no test coverage detected