Parse binary number literals (0bxxx).

This commit is contained in:
Mike Pall
2015-08-19 02:10:36 +02:00
parent 0dcd2d1292
commit eb050f9e2a
3 changed files with 56 additions and 7 deletions

View File

@@ -546,8 +546,8 @@ corresponding ctype.
The parser for Lua source code treats numeric literals with the
suffixes <tt>LL</tt> or <tt>ULL</tt> as signed or unsigned 64&nbsp;bit
integers. Case doesn't matter, but uppercase is recommended for
readability. It handles both decimal (<tt>42LL</tt>) and hexadecimal
(<tt>0x2aLL</tt>) literals.
readability. It handles decimal (<tt>42LL</tt>), hexadecimal
(<tt>0x2aLL</tt>) and binary (<tt>0b101010LL</tt>) literals.
</p>
<p>
The imaginary part of complex numbers can be specified by suffixing