Small changes
This commit is contained in:
parent
b12347f92d
commit
ba325f15a1
8
Makefile
8
Makefile
@ -1,7 +1,11 @@
|
|||||||
CC=clang
|
CC ?= clang
|
||||||
|
CFLAGS ?=
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(CC) -o lbr -O2 -Wall -Wextra -Wpedantic src/*.c
|
$(CC) -o lbr -O2 -Wall -Wextra -Wpedantic $(CFLAGS) src/*.c
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm lbr
|
||||||
|
|
||||||
test:
|
test:
|
||||||
./lbr tests/test.lb
|
./lbr tests/test.lb
|
@ -532,11 +532,7 @@ void execute(Stack *stack, Stack *originstack, char *modname)
|
|||||||
|
|
||||||
if (!strcmp(NAME, "size"))
|
if (!strcmp(NAME, "size"))
|
||||||
{
|
{
|
||||||
int i = 0;
|
stack_push(stack, stack->pointer);
|
||||||
while (i < stack->pointer)
|
|
||||||
i++;
|
|
||||||
|
|
||||||
stack_push(stack, i);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user