From faf042ecc3e688a1a3ffbe1ac44d18dd7ddf441a Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 29 May 2025 08:05:57 -0700 Subject: 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> --- source/slang/slang-ast-decl.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'source/slang/slang-ast-decl.h') diff --git a/source/slang/slang-ast-decl.h b/source/slang/slang-ast-decl.h index d4ac71d83..e281081a7 100644 --- a/source/slang/slang-ast-decl.h +++ b/source/slang/slang-ast-decl.h @@ -525,15 +525,14 @@ class ModuleDecl : public NamespaceDeclBase /// FIDDLE() OrderedDictionary> mapDeclToAssociatedDecls; - /// Whether the module is defined in legacy language. - /// The legacy Slang language does not have visibility modifiers and everything is treated as - /// `public`. Newer version of the language introduces visibility and makes `internal` as the - /// default. To prevent this from breaking existing code, we need to know whether a module is - /// written in the legacy language. We detect this by checking whether the module has any - /// visibility modifiers, or if the module uses new language constructs, e.g. `module`, - /// `__include`, - /// `__implementing` etc. - FIDDLE() bool isInLegacyLanguage = true; + /// Whether Slang language version the module is defined in. + /// The legacy Slang language (2025) does not have visibility modifiers and everything is + /// treated as `public`. Newer version of the language introduces visibility and makes + /// `internal` as the default. To prevent this from breaking existing code, we need to know + /// whether a module is written in the legacy language. We detect this by checking whether the + /// module has any visibility modifiers, or if the module uses new language constructs, e.g. + /// `module`, `__include`, `__implementing` etc. + FIDDLE() SlangLanguageVersion languageVersion = SLANG_LANGAUGE_VERSION_DEFAULT; FIDDLE() DeclVisibility defaultVisibility = DeclVisibility::Internal; -- cgit v1.2.3