Added modulo operator '%'

- added OP_MOD, which performs a modulo operation on the 2 <number> values on the stack. Pops the 2 values and pushes the result.
- also added TOKEN_PERCENT to the lexer, and extended binary() in cparse.c to support it.
This commit is contained in:
2021-01-01 00:47:15 -06:00
parent 58485d9375
commit 84f7895684
7 changed files with 22 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
CC=clang
CFLAGS=-fPIE -Wall -O3 -std=c11
LDFLAGS=#-fsanitize=address
LDFLAGS=-lm #-fsanitize=address
OUT=bin/cosmo
CHDR=\