summaryrefslogtreecommitdiffstats
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-type-text-util.cpp19
-rw-r--r--source/core/slang-type-text-util.h8
2 files changed, 15 insertions, 12 deletions
diff --git a/source/core/slang-type-text-util.cpp b/source/core/slang-type-text-util.cpp
index 4797395b7..9f55b69e2 100644
--- a/source/core/slang-type-text-util.cpp
+++ b/source/core/slang-type-text-util.cpp
@@ -99,10 +99,10 @@ static const NamesDescriptionValue s_languageInfos[] = {
{SLANG_SOURCE_LANGUAGE_CUDA, "cu,cuda", "CUDA"},
};
-static const NamesDescriptionValue s_stdRevisionInfos[] = {
- {SLANG_STD_REVISION_UNKNOWN, "unknown", "Unknown"},
- {SLANG_STD_REVISION_2025, "2025,default", "Slang language rules for 2025 and older"},
- {SLANG_STD_REVISION_2026, "2026", "Slang language rules for 2026 and newer"},
+static const NamesDescriptionValue s_languageVersionInfos[] = {
+ {SLANG_LANGUAGE_VERSION_LEGACY, "legacy,default,2018", "Legacy Slang language"},
+ {SLANG_LANGUAGE_VERSION_2025, "2025", "Slang language rules for 2025 and older"},
+ {SLANG_LANGUAGE_VERSION_2026, "2026,latest", "Slang language rules for 2026 and newer"},
};
static const NamesDescriptionValue s_compilerInfos[] = {
@@ -223,9 +223,9 @@ static const NamesDescriptionValue s_fileSystemTypes[] = {
return makeConstArrayView(s_languageInfos);
}
-/* static */ ConstArrayView<NamesDescriptionValue> TypeTextUtil::getStdRevisionInfos()
+/* static */ ConstArrayView<NamesDescriptionValue> TypeTextUtil::getLanguageVersionInfos()
{
- return makeConstArrayView(s_stdRevisionInfos);
+ return makeConstArrayView(s_languageVersionInfos);
}
/* static */ ConstArrayView<NamesDescriptionValue> TypeTextUtil::getCompilerInfos()
@@ -328,9 +328,12 @@ static const NamesDescriptionValue s_fileSystemTypes[] = {
return NameValueUtil::findValue(getLanguageInfos(), text, SLANG_SOURCE_LANGUAGE_UNKNOWN);
}
-/* static */ SlangStdRevision TypeTextUtil::findStdRevision(const UnownedStringSlice& text)
+/* static */ SlangLanguageVersion TypeTextUtil::findLanguageVersion(const UnownedStringSlice& text)
{
- return NameValueUtil::findValue(getStdRevisionInfos(), text, SLANG_STD_REVISION_UNKNOWN);
+ return NameValueUtil::findValue(
+ getLanguageVersionInfos(),
+ text,
+ SLANG_LANGUAGE_VERSION_UNKNOWN);
}
/* static */ SlangPassThrough TypeTextUtil::findPassThrough(const UnownedStringSlice& slice)
diff --git a/source/core/slang-type-text-util.h b/source/core/slang-type-text-util.h
index bc136c3ab..eddbcec5e 100644
--- a/source/core/slang-type-text-util.h
+++ b/source/core/slang-type-text-util.h
@@ -33,8 +33,8 @@ struct TypeTextUtil
/// Get the language infos
static ConstArrayView<NamesDescriptionValue> getLanguageInfos();
- /// Get the std revision infos
- static ConstArrayView<NamesDescriptionValue> getStdRevisionInfos();
+ /// Get the language version infos
+ static ConstArrayView<NamesDescriptionValue> getLanguageVersionInfos();
/// Get the compiler infos
static ConstArrayView<NamesDescriptionValue> getCompilerInfos();
/// Get the archive type infos
@@ -73,8 +73,8 @@ struct TypeTextUtil
/// Given a source language name returns a source language. Name here is distinct from extension
static SlangSourceLanguage findSourceLanguage(const UnownedStringSlice& text);
- /// Given a std revision returns a std revision.
- static SlangStdRevision findStdRevision(const UnownedStringSlice& text);
+ /// Given a language version name returns a language revision.
+ static SlangLanguageVersion findLanguageVersion(const UnownedStringSlice& text);
/// Given a name returns the pass through
static SlangPassThrough findPassThrough(const UnownedStringSlice& slice);