Home | History | Annotate | Download | only in glsl

Lines Matching refs:src

43 skip_whitespace(const char *&src, char *&symbol_buffer)
45 size_t n = strspn(src, " \v\t\r\n");
46 src += n;
49 if (src[0] == ';') {
50 n = strcspn(src, "\n");
51 src += n;
53 skip_whitespace(src, symbol_buffer);
58 read_atom(void *ctx, const char *&src, char *&symbol_buffer)
62 skip_whitespace(src, symbol_buffer);
64 size_t n = strcspn(src, "( \v\t\r\n);");
71 if (n == 4 && strncmp(src, "+INF", 4) == 0) {
76 double f = glsl_strtod(src, &float_end);
77 if (float_end != src) {
79 int i = strtol(src, &int_end, 10);
92 src += n;
99 __read_expression(void *ctx, const char *&src, char *&symbol_buffer)
101 s_expression *atom = read_atom(ctx, src, symbol_buffer);
105 skip_whitespace(src, symbol_buffer);
106 if (src[0] == '(') {
107 ++src;
113 while ((expr = __read_expression(ctx, src, symbol_buffer)) != NULL) {
116 skip_whitespace(src, symbol_buffer);
117 if (src[0] != ')') {
121 ++src;
129 s_expression::read_expression(void *ctx, const char *&src)
131 assert(src != NULL);
143 char *symbol_buffer = ralloc_strdup(ctx, src);
144 return __read_expression(ctx, src, symbol_buffer);