Allow underscores in @ syntax

This commit is contained in:
Jarcode
2019-03-14 22:00:42 -07:00
parent 06644549e2
commit 4cdf1f13f9
2 changed files with 3 additions and 2 deletions

View File

@@ -470,7 +470,8 @@ void ext_process(struct glsl_ext* ext, const char* f) {
handle_bind: /* use character for binding syntax */
case 'a' ... 'z':
case 'A' ... 'Z':
case '0' ... '9': {
case '0' ... '9':
case '_': {
if (b_spc && b_br <= 0)
goto emit_bind; /* skip non-braced characters after space: `@sym:vec4 c` */
bbuf[bbuf_idx] = at;

View File

@@ -20,7 +20,7 @@
/* Bar color changes with height */
#define GRADIENT (d / GRADIENT_POWER + 1)
/* Bar color */
#define COLOR (@fg:#3366b2 * GRADIENT)
#define COLOR (#3366b2 * GRADIENT)
/* Direction that the bars are facing, 0 for inward, 1 for outward */
#define DIRECTION 0
/* Whether to switch left/right audio buffers */