Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add binary literal #190

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

privat
Copy link
Contributor

@privat privat commented Jul 24, 2023

Add binary literal syntax, e.g. 0b101010.

Decimal, hexadecimal, and octal are already handled, but binary was missing.
Binary literals are useful for testing flags and to teach binary to students.

This is consistent with the GNU assembler syntax that accept it https://sourceware.org/binutils/docs-2.40/as/Integers.html

Add also some simple tests on integer literals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant