Example #1
0
PUBLIC char *lex_opsym(int sym)
{
	char *s = lex_sym(sym);

	switch (sym) {
	case andSYM:
		return " AND ";
	case divSYM:
		return " DIV ";
	case eorSYM:
		return " EOR ";
	case inSYM:
		return " IN ";
	case modSYM:
		return " MOD ";
	case orSYM:
		return " OR ";
	case andthenSYM:
		return " AND THEN ";
	case orthenSYM:
		return " OR THEN ";
	}

	return s;
}
Example #2
0
PRIVATE void list_sym(char **buf, int sym)
{
	list_text(buf, lex_sym(sym));
}
Example #3
0
    case SCOPE_OK:
        *error = current;
        break;

    case SCOPE_NOMEM:
        break;

    case SCOPE_DUPLICATED:
        *error = current == SCOPE_NOMEM ? SCOPE_NOMEM : SCOPE_DUPLICATED;
        break;
    }
}

const struct scope_builtin_const scope_builtin_consts[] = {
    {
        lex_sym("null"),
        type(VPTR, 1),
    },

    {
        lex_sym("true"),
        type(U8, 1),
    },

    {
        lex_sym("false"),
        type(U8, 1),
    },
};

static_assert(countof(scope_builtin_consts) == SCOPE_BCON_ID_COUNT, "");