summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-06-01 04:08:28 +0200
committerGitHub <noreply@github.com>2020-06-01 04:08:28 +0200
commit36aff97b92f9f42f9bc59911b7d06110a8e9aed5 (patch)
tree69d20dc9137da111ecda664a896bbf0abbead02e /db
parentb9f7d1439c84b64facaf7d2875adc29110c65cf4 (diff)
parentc66d467fb5816734851b7de6b20537ce7a08c861 (diff)
downloadhercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.tar.gz
hercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.tar.bz2
hercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.tar.xz
hercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.zip
Merge pull request #2671 from Helianthella/binliteral
add support for binary and octal number literals
Diffstat (limited to 'db')
-rw-r--r--db/constants.conf16
1 files changed, 14 insertions, 2 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 6f8030a45..70f5569b4 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -29,12 +29,24 @@
constants_db: {
/************* Entry structure (short) ************************************
- Identifier: value // (int)
+ Identifier: value // (integer literal)
************* Entry structure (full) *************************************
Identifier: {
- Value: value // (int)
+ Value: value // (integer literal)
Deprecated: true // (boolean) Defaults to false.
}
+ ************* Supported integer literals *********************************
+ decimal: 1337 // no prefix
+ hexadecimal: 0x1337 // prefix: 0x
+ octal: 0o1337 // prefix: 0o
+ binary: 0b101101 // prefix: 0b
+
+ Underscores can also be used as visual separators for digit grouping purposes:
+ 2_147_483_647
+ 0x7FFF_FFFF
+
+ Keep in mind that number literals cannot start or end with a separator and no
+ more than one separator can be used in a row (so 12_3___456 is illegal).
**************************************************************************/
comment__: "Weekdays"