elikaski / BF-it

A C-like language to Brainfuck compiler, written in Python
MIT License
121 stars 11 forks source link

Support octal and binary literals #38

Open NeeEoo opened 3 years ago

NeeEoo commented 3 years ago

Octal literals are defined as 0[0-7]+ Binary literals are defined as 0b[01]+

elikaski commented 3 years ago

Good idea! Need to add it to lexical analyzer and get_NUM_token_value function

elikaski commented 3 years ago

Let's make octal like Python: 0o[0-7]+

abhra2020-smart commented 3 years ago

lol no need to do anything it already does support octals and stuff

NeeEoo commented 3 years ago

This is talking about integers.

int octal = 0b635;
int binary = 0b1101010;
abhra2020-smart commented 3 years ago

Oh, sorry!