summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-05-29 08:05:57 -0700
committerGitHub <noreply@github.com>2025-05-29 08:05:57 -0700
commitfaf042ecc3e688a1a3ffbe1ac44d18dd7ddf441a (patch)
treeb54abb2e65b7791d74335ead396cf762f805ab5c /source/slang/slang-options.cpp
parent45d794f57d453a5564a7360400c5bfc04bf12b31 (diff)
Language version + tuple syntax. (#7230)
* Language version + tuple syntax. * Fix compile error. * regenerate documentation Table of Contents * Fix. * regenerate command line reference * Fix. * Fix. * Fix more test failures. * revert empty line change, * Retrigger CI * #version->#lang * Update source/core/slang-type-text-util.cpp Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> * Remove comments. * Fix parsing logic. * Fix parser. * Fix parser. * update test comment * Update options. * regenerate documentation Table of Contents * regenerate command line reference --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 0182b4c22..3ce107135 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -63,7 +63,7 @@ enum class ValueCategory
FileSystemType,
VulkanShift,
SourceEmbedStyle,
- StdRevision,
+ LanguageVersion,
CountOf,
};
@@ -150,10 +150,10 @@ void initCommandOptions(CommandOptions& options)
options.addCategory(
CategoryKind::Value,
- "std-revision",
- "Std Revision",
- UserValue(ValueCategory::StdRevision));
- options.addValues(TypeTextUtil::getStdRevisionInfos());
+ "language-version",
+ "Language Version",
+ UserValue(ValueCategory::LanguageVersion));
+ options.addValues(TypeTextUtil::getLanguageVersionInfos());
options.addCategory(
@@ -455,9 +455,9 @@ void initCommandOptions(CommandOptions& options)
"Display the build version. This is the contents of git describe --tags.\n"
"It is typically only set from automated builds(such as distros available on github).A "
"user build will by default be 'unknown'."},
- {OptionKind::StdRevision,
+ {OptionKind::LanguageVersion,
"-std",
- "-std <std-revision>",
+ "-std <language-version>",
"Specifies the language standard that should be used."},
{OptionKind::WarningsAsErrors,
"-warnings-as-errors",
@@ -2555,21 +2555,21 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
}
break;
}
- case OptionKind::StdRevision:
+ case OptionKind::LanguageVersion:
{
CommandLineArg name;
SLANG_RETURN_ON_FAIL(m_reader.expectArg(name));
- SlangStdRevision stdRevision =
- TypeTextUtil::findStdRevision(name.value.getUnownedSlice());
- if (stdRevision == SLANG_STD_REVISION_UNKNOWN)
+ SlangLanguageVersion stdRevision =
+ TypeTextUtil::findLanguageVersion(name.value.getUnownedSlice());
+ if (stdRevision == SLANG_LANGUAGE_VERSION_UNKNOWN)
{
- m_sink->diagnose(name.loc, Diagnostics::unknownStdRevision, name.value);
+ m_sink->diagnose(name.loc, Diagnostics::unknownLanguageVersion, name.value);
return SLANG_FAIL;
}
else
{
- linkage->m_optionSet.add(OptionKind::StdRevision, stdRevision);
+ linkage->m_optionSet.add(OptionKind::LanguageVersion, stdRevision);
}
break;
}