aboutsummaryrefslogtreecommitdiff
path: root/core/flags/constants.odin
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2024-06-06 18:35:43 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2024-06-07 13:16:13 -0400
commitedb685f04be9aef407dc8abac7bb76fb51184f9f (patch)
tree63f48c951de7a9d751895a3cd72194e241bd38c0 /core/flags/constants.odin
parent08612423b9afffb7499d8db2c69715df1627bd50 (diff)
Add package `core:flags`
Diffstat (limited to 'core/flags/constants.odin')
-rw-r--r--core/flags/constants.odin38
1 files changed, 38 insertions, 0 deletions
diff --git a/core/flags/constants.odin b/core/flags/constants.odin
new file mode 100644
index 000000000..ab3dc9a0a
--- /dev/null
+++ b/core/flags/constants.odin
@@ -0,0 +1,38 @@
+package flags
+
+import "core:time"
+
+// Set to true to compile with support for core named types disabled, as a
+// fallback in the event your platform does not support one of the types, or
+// you have no need for them and want a smaller binary.
+NO_CORE_NAMED_TYPES :: #config(ODIN_CORE_FLAGS_NO_CORE_NAMED_TYPES, false)
+
+// Override support for parsing `time` types.
+IMPORTING_TIME :: #config(ODIN_CORE_FLAGS_USE_TIME, time.IS_SUPPORTED)
+
+// Override support for parsing `net` types.
+// TODO: Update this when the BSDs are supported.
+IMPORTING_NET :: #config(ODIN_CORE_FLAGS_USE_NET, ODIN_OS == .Windows || ODIN_OS == .Linux || ODIN_OS == .Darwin)
+
+TAG_ARGS :: "args"
+SUBTAG_NAME :: "name"
+SUBTAG_POS :: "pos"
+SUBTAG_REQUIRED :: "required"
+SUBTAG_HIDDEN :: "hidden"
+SUBTAG_VARIADIC :: "variadic"
+SUBTAG_FILE :: "file"
+SUBTAG_PERMS :: "perms"
+SUBTAG_INDISTINCT :: "indistinct"
+
+TAG_USAGE :: "usage"
+
+UNDOCUMENTED_FLAG :: "<This flag has not been documented yet.>"
+
+INTERNAL_VARIADIC_FLAG :: "varg"
+
+RESERVED_HELP_FLAG :: "help"
+RESERVED_HELP_FLAG_SHORT :: "h"
+
+// If there are more than this number of flags in total, only the required and
+// positional flags will be shown in the one-line usage summary.
+ONE_LINE_FLAG_CUTOFF_COUNT :: 16