Mercurial > audlegacy
comparison src/audacious/tuple_compiler.h @ 3954:7afbcd87cd65
The compiler should now correctly recognize integer constants, thanks to
Yuri K. Schlesner for spotting this really stupid bug .. which I should've
seen much earlier.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 16 Nov 2007 09:14:40 +0200 |
parents | 4f6c614aee5d |
children | ce3f2d2455cf |
comparison
equal
deleted
inserted
replaced
3953:de76dbec8e1e | 3954:7afbcd87cd65 |
---|---|
58 */ | 58 */ |
59 typedef struct { | 59 typedef struct { |
60 gchar *name; | 60 gchar *name; |
61 gboolean istemp; /* Scope of variable - TRUE = temporary */ | 61 gboolean istemp; /* Scope of variable - TRUE = temporary */ |
62 gint type; /* Type of variable, see VAR_* */ | 62 gint type; /* Type of variable, see VAR_* */ |
63 gchar *defval; /* Defined value ${=foo,bar} */ | 63 gchar *defvals; /* Defined value ${=foo,bar} */ |
64 gint defvali; | |
65 TupleValueType ctype; /* Type of constant/def value */ | |
64 | 66 |
65 gint fieldidx; /* if >= 0: Index # of "pre-defined" Tuple fields */ | 67 gint fieldidx; /* if >= 0: Index # of "pre-defined" Tuple fields */ |
66 TupleValue *fieldref; /* Cached tuple field ref */ | 68 TupleValue *fieldref; /* Cached tuple field ref */ |
67 } TupleEvalVar; | 69 } TupleEvalVar; |
68 | 70 |
96 | 98 |
97 | 99 |
98 TupleEvalContext * tuple_evalctx_new(void); | 100 TupleEvalContext * tuple_evalctx_new(void); |
99 void tuple_evalctx_reset(TupleEvalContext *ctx); | 101 void tuple_evalctx_reset(TupleEvalContext *ctx); |
100 void tuple_evalctx_free(TupleEvalContext *ctx); | 102 void tuple_evalctx_free(TupleEvalContext *ctx); |
101 gint tuple_evalctx_add_var(TupleEvalContext *ctx, const gchar *name, const gboolean istemp, const gint type); | 103 gint tuple_evalctx_add_var(TupleEvalContext *ctx, const gchar *name, const gboolean istemp, const gint type, const TupleValueType ctype); |
102 | 104 |
103 void tuple_evalnode_free(TupleEvalNode *expr); | 105 void tuple_evalnode_free(TupleEvalNode *expr); |
104 | 106 |
105 TupleEvalNode *tuple_formatter_compile(TupleEvalContext *ctx, gchar *expr); | 107 TupleEvalNode *tuple_formatter_compile(TupleEvalContext *ctx, gchar *expr); |
106 gchar *tuple_formatter_eval(TupleEvalContext *ctx, TupleEvalNode *expr, Tuple *tuple); | 108 gchar *tuple_formatter_eval(TupleEvalContext *ctx, TupleEvalNode *expr, Tuple *tuple); |