mirror of
https://github.com/janet-lang/janet
synced 2024-12-01 04:19:55 +00:00
Remove extra function call that cannot ever trigger.
This commit is contained in:
parent
1ef5c038db
commit
2fde34b519
@ -735,12 +735,6 @@ static const uint8_t *peg_getrange(Builder *b, Janet x) {
|
||||
return str;
|
||||
}
|
||||
|
||||
static int32_t peg_getboolean(Builder *b, Janet x) {
|
||||
if (!janet_checktype(x, JANET_BOOLEAN))
|
||||
peg_panicf(b, "expected boolean, got %v", x);
|
||||
return janet_unwrap_boolean(x);
|
||||
}
|
||||
|
||||
static int32_t peg_getinteger(Builder *b, Janet x) {
|
||||
if (!janet_checkint(x))
|
||||
peg_panicf(b, "expected integer, got %v", x);
|
||||
@ -1269,7 +1263,7 @@ static uint32_t peg_compile1(Builder *b, Janet peg) {
|
||||
return 0;
|
||||
|
||||
case JANET_BOOLEAN: {
|
||||
int n = peg_getboolean(b, peg);
|
||||
int n = janet_unwrap_boolean(peg);
|
||||
Reserve r = reserve(b, 2);
|
||||
emit_1(r, n ? RULE_NCHAR : RULE_NOTNCHAR, 0);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user