예제 #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;
    }
}
예제 #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());
}
예제 #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)));
}
예제 #4
0
static int exception_pred(lua_State * L) {
    return push_boolean(L, is_exception(L, 1));
}
예제 #5
0
파일: rb_map.cpp 프로젝트: bmalehorn/lean
static int lua_rb_map_contains(lua_State * L) {
    return push_boolean(L, to_lua_rb_map(L, 1).contains(luaref(L, 2)));
}
예제 #6
0
파일: mpq.cpp 프로젝트: dumganhar/lean-osx
static int mpq_lt(lua_State * L) {
    return push_boolean(L, to_mpq<1>(L) < to_mpq<2>(L));
}
예제 #7
0
static int curr_is_numeral(lua_State * L) { return push_boolean(L, gparser.curr_is_numeral()); }
예제 #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)));
}
예제 #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))); }
예제 #10
0
static int curr_is_identifier(lua_State * L) { return push_boolean(L, gparser.curr_is_identifier()); }
예제 #11
0
파일: options.cpp 프로젝트: cpehle/lean
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));
}
예제 #12
0
파일: options.cpp 프로젝트: cpehle/lean
static int options_empty(lua_State * L) {
    return push_boolean(L, to_options(L, 1).empty());
}
예제 #13
0
파일: options.cpp 프로젝트: cpehle/lean
static int options_contains(lua_State * L) {
    return push_boolean(L, to_options(L, 1).contains(to_name_ext(L, 2)));
}
예제 #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());
}
예제 #15
0
static int curr_is_string(lua_State * L) { return push_boolean(L, gparser.curr_is_string()); }
예제 #16
0
static int is_nud(lua_State * L) {
    return push_boolean(L, to_parse_table(L, 1).is_nud());
}
예제 #17
0
static int curr_is_keyword(lua_State * L) { return push_boolean(L, gparser.curr_is_keyword()); }
예제 #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);
}
예제 #19
0
static int curr_is_command(lua_State * L) { return push_boolean(L, gparser.curr_is_command()); }
예제 #20
0
static int mpz_eq(lua_State * L) {
    return push_boolean(L, to_mpz<1>(L) == to_mpz<2>(L));
}
예제 #21
0
static int curr_is_quoted_symbol(lua_State * L) { return push_boolean(L, gparser.curr_is_quoted_symbol()); }
예제 #22
0
파일: name_set.cpp 프로젝트: fgdorais/lean
static int name_set_contains(lua_State * L) { return push_boolean(L, to_name_set(L, 1).contains(to_name_ext(L, 2))); }
예제 #23
0
파일: choice.cpp 프로젝트: cpehle/lean
static int is_choice(lua_State * L) {
    return push_boolean(L, is_choice(to_expr(L, 1)));
}
예제 #24
0
파일: rb_map.cpp 프로젝트: bmalehorn/lean
static int lua_rb_map_empty(lua_State * L) {
    return push_boolean(L, to_lua_rb_map(L, 1).empty());
}
예제 #25
0
파일: mpz.cpp 프로젝트: bmalehorn/lean
static int mpz_lt(lua_State * L) {
    return push_boolean(L, to_mpz_ext(L, 1) < to_mpz_ext(L, 2));
}