Example #1
0
static int value_of(lua_State * L) {
    auto it = value_of(to_token_table(L, 1));
    if (it) {
        push_boolean(L, it->is_command());
        push_name(L, it->value());
        push_integer(L, it->expr_precedence());
        return 3;
    } else {
        push_nil(L);
        return 1;
    }
}
Example #2
0
static int is_fold_right(lua_State * L) {
    check_action(L, 1, { action_kind::Exprs });
    return push_boolean(L, to_notation_action(L, 1).is_fold_right());
}
Example #3
0
static int is_equal(lua_State * L) {
    return push_boolean(L, to_notation_action(L, 1).is_equal(to_notation_action(L, 2)));
}
Example #4
0
static int exception_pred(lua_State * L) {
    return push_boolean(L, is_exception(L, 1));
}
Example #5
0
static int lua_rb_map_contains(lua_State * L) {
    return push_boolean(L, to_lua_rb_map(L, 1).contains(luaref(L, 2)));
}
Example #6
0
static int mpq_lt(lua_State * L) {
    return push_boolean(L, to_mpq<1>(L) < to_mpq<2>(L));
}
Example #7
0
static int curr_is_numeral(lua_State * L) { return push_boolean(L, gparser.curr_is_numeral()); }
Example #8
0
static int has_placeholder(lua_State * L) {
    if (is_expr(L, 1))
        return push_boolean(L, has_placeholder(to_expr(L, 1)));
    else
        return push_boolean(L, has_placeholder(to_level(L, 1)));
}
Example #9
0
static int curr_is_token_or_id(lua_State * L) { return push_boolean(L, gparser.curr_is_token_or_id(to_name_ext(L, 1))); }
Example #10
0
static int curr_is_identifier(lua_State * L) { return push_boolean(L, gparser.curr_is_identifier()); }
Example #11
0
static int options_get_bool(lua_State * L) {
    int nargs = lua_gettop(L);
    bool defval = nargs < 3 ? false : lua_toboolean(L, 3);
    return push_boolean(L, to_options(L, 1).get_bool(to_name_ext(L, 2), defval));
}
Example #12
0
static int options_empty(lua_State * L) {
    return push_boolean(L, to_options(L, 1).empty());
}
Example #13
0
static int options_contains(lua_State * L) {
    return push_boolean(L, to_options(L, 1).contains(to_name_ext(L, 2)));
}
Example #14
0
static int use_lambda_abstraction(lua_State * L) {
    check_action(L, 1, { action_kind::ScopedExpr });
    return push_boolean(L, to_notation_action(L, 1).use_lambda_abstraction());
}
Example #15
0
static int curr_is_string(lua_State * L) { return push_boolean(L, gparser.curr_is_string()); }
Example #16
0
static int is_nud(lua_State * L) {
    return push_boolean(L, to_parse_table(L, 1).is_nud());
}
Example #17
0
static int curr_is_keyword(lua_State * L) { return push_boolean(L, gparser.curr_is_keyword()); }
Example #18
0
void lutok::state::set_field(const std::string& name, const bool value, const int index){
	push_literal(name);
	push_boolean(value);
	set_table(index);
}
Example #19
0
static int curr_is_command(lua_State * L) { return push_boolean(L, gparser.curr_is_command()); }
Example #20
0
static int mpz_eq(lua_State * L) {
    return push_boolean(L, to_mpz<1>(L) == to_mpz<2>(L));
}
Example #21
0
static int curr_is_quoted_symbol(lua_State * L) { return push_boolean(L, gparser.curr_is_quoted_symbol()); }
Example #22
0
static int name_set_contains(lua_State * L) { return push_boolean(L, to_name_set(L, 1).contains(to_name_ext(L, 2))); }
Example #23
0
static int is_choice(lua_State * L) {
    return push_boolean(L, is_choice(to_expr(L, 1)));
}
Example #24
0
static int lua_rb_map_empty(lua_State * L) {
    return push_boolean(L, to_lua_rb_map(L, 1).empty());
}
Example #25
0
static int mpz_lt(lua_State * L) {
    return push_boolean(L, to_mpz_ext(L, 1) < to_mpz_ext(L, 2));
}