diff --git a/src/EditLexers/stlVB.cpp b/src/EditLexers/stlVB.cpp index ee9a6c6679..4634b63b10 100644 --- a/src/EditLexers/stlVB.cpp +++ b/src/EditLexers/stlVB.cpp @@ -3,9 +3,10 @@ static KEYWORDLIST Keywords_VB = {{ //++Autogenerated -- start of section automatically generated -"AddHandler AddHandler( AddressOf Aggregate Alias And AndAlso Ansi As Assembly Async Auto Await Binary By ByRef ByVal " -"Call Case Catch Class Compare Const Continue Custom Declare Default Delegate Dim DirectCast Distinct Do " -"Each Else ElseIf End Enum Equals Erase Error Event Exit Explicit False Finally For Friend From Function " +"AddHandler AddHandler( AddressOf Aggregate Alias And AndAlso Ansi As Ascending Assembly Async Auto Await " +"Binary By ByRef ByVal Call Case Catch Class Compare Const Continue Custom " +"Declare Default Delegate Descending Dim DirectCast Distinct Do " +"Each Else ElseIf End Enum Equals Erase Error Event Exit Explicit False Finally For Friend From Function Function( " "Get GetType( GetXMLNamespace( Global GoTo Group Handles " "If If( Implements Imports In Infer Inherits Interface Into Is IsFalse( IsNot IsTrue( Iterator Join Key " "Let Lib Like Loop Me Mod Module MustInherit MustOverride My MyBase MyClass " @@ -13,7 +14,7 @@ static KEYWORDLIST Keywords_VB = {{ "Of Off On Operator Option Optional Or Order OrElse Out Overloads Overridable Overrides " "ParamArray Partial Preserve Private Property Protected Public " "RaiseEvent RaiseEvent( ReadOnly ReDim Rem RemoveHandler RemoveHandler( Resume Return " -"Select Set Set( Shadows Shared Skip Static Step Stop Strict Structure Sub SyncLock " +"Select Set Set( Shadows Shared Skip Static Step Stop Strict Structure Sub Sub( SyncLock " "Take Text Then Throw To True Try TryCast( TypeOf Unicode Until Using " "When Where While Widening With WithEvents WriteOnly Xor Yield " @@ -31,7 +32,7 @@ static KEYWORDLIST Keywords_VB = {{ "Const Disable Else ElseIf Enable End EndIf ExternalChecksum ExternalSource If Region " , // 4 attribute -"AttributeUsage( ComClass( Conditional( DllImport( HideModuleName( MarshalAs( MyGroupCollection( Obsolete( " +"AttributeUsage( ComClass( Conditional( DllImport( Extension( HideModuleName( MarshalAs( MyGroupCollection( Obsolete( " "Serializable( StructLayout( VBFixedArray( VBFixedString( " , // 5 class diff --git a/src/Styles.cpp b/src/Styles.cpp index 71ab2a4765..6422d2a4c1 100644 --- a/src/Styles.cpp +++ b/src/Styles.cpp @@ -1347,8 +1347,6 @@ void Style_DefineIndicator(int index, int indicator, int indicatorStyle) noexcep // Style_SetLexer() // void Style_SetLexer(PEDITLEXER pLexNew, BOOL bLexerChanged) noexcept { - int iValue; - // Select default if nullptr is specified if (!pLexNew) { np2LexLangIndex = 0; @@ -1491,7 +1489,7 @@ void Style_SetLexer(PEDITLEXER pLexNew, BOOL bLexerChanged) noexcept { szValue = lexGlobal.Styles[GlobalStyleIndex_DefaultText].szValue; Style_StrGetFontEx(szValue, defaultTextFontName, COUNTOF(defaultTextFontName), true); - iValue = pLexNew->bUseDefaultCodeStyle ? GlobalStyleIndex_DefaultCode : GlobalStyleIndex_DefaultText; + int iValue = pLexNew->bUseDefaultCodeStyle ? GlobalStyleIndex_DefaultCode : GlobalStyleIndex_DefaultText; szValue = lexGlobal.Styles[iValue].szValue; // base font size if (!Style_StrGetFontSize(szValue, &iBaseFontSize)) { @@ -2436,6 +2434,9 @@ static void Style_UpdateLexerLang(LPCEDITLEXER pLex, LPCWSTR lpszExt, LPCWSTR lp } break; + case NP2LEX_VBSCRIPT: + np2LexLangIndex = IDM_LEXER_VBS; + break; case NP2LEX_VISUALBASIC: if (lstrlen(lpszExt) == 3) { np2LexLangIndex = IDM_LEXER_VBA; diff --git a/tools/lang/VB.NET.vb b/tools/lang/VB.NET.vb index bdfa0d1438..f3a504b065 100644 --- a/tools/lang/VB.NET.vb +++ b/tools/lang/VB.NET.vb @@ -19,8 +19,9 @@ Declare Function Lib Alias As Shared Shadows Static ReadOnly Delegate Sub Of As Delegate Function Of As -Dim WithEvents As New With +Dim WithEvents As New ' With {} Do + End Continue Do Exit Do Do While @@ -63,22 +64,26 @@ ElseIf Then Else End If If Then Else +Implements Imports +Inherits Interface Of - ' Property - ' Function - ' Sub - ' Event - ' Interface - ' Class - ' Structure + Inherits + Property + Function + Sub + Event + Interface + Class + Structure End Interface Mid() Module End Module Namespace Global End Namespace -On Error GoTo Resume Next +On Error GoTo +On Error Resume Next Public Overloads Shared Shadows Widening Narrowing Operator As Return @@ -87,7 +92,7 @@ Option Compare Binary Text Option Explicit On Off Option Infer On Off Option Strict On Off -Property +Property As Implements Get End Get Set() @@ -98,14 +103,17 @@ RaiseEvent ReDim Preserve Rem RemoveHandler AddressOf +Resume Next +Return Select Case Case Else + Case To End Select Stop Structure Of Implements End Structure -Sub +Partial Sub Exit Sub End Sub SyncLock @@ -134,7 +142,7 @@ From As In Group By Into Group Join As In On Equals And Equals Into Let -Order By +Order By Ascending Descending Select Skip While Take While @@ -152,6 +160,10 @@ Or OrElse TryCast() TypeOf Is IsNot Xor +' https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/procedures/lambda-expressions +Function() And +Sub() And + ' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/modifiers/ Ansi Assembly Async Auto ByRef ByVal @@ -199,6 +211,8 @@ Variant +' https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/procedures/extension-methods + '! directives ======================================================= ' https://learn.microsoft.com/en-us/dotnet/visual-basic/reference/language-specification/preprocessing-directives diff --git a/tools/lang/VBA.bas b/tools/lang/VBA.bas index 7f28921986..71f4d9eb65 100644 --- a/tools/lang/VBA.bas +++ b/tools/lang/VBA.bas @@ -17,13 +17,15 @@ ChDir ChDrive Close Const As +Date Declare PtrSafe Sub Lib Alias Declare PtrSafe Function Lib Alias As DefBool DefByte DefInt DefLng DefLngLng DefLngPtr DefCur DefSng DefDbl DefDec DefDate DefStr DefObj DefVar DeleteSetting -Dim As New WithEvents +Dim WithEvents As New Do + End Exit Do Do While Loop @@ -63,8 +65,8 @@ Kill Let Line Input Load -Lock -Unlock +Lock To +Unlock To LSet Mid() MkDir @@ -77,8 +79,8 @@ Open For Access As Len Option Base Option Compare Binary Text Database Option Explicit -Option Private -Print +Option Private Module +Print Spc() Tab() Private WithEvents As New Property Get As Exit Property @@ -101,7 +103,8 @@ SavePicture ' VB6 SaveSetting Seek Select Case -Case Else + Case Else + Case To End Select SendKeys Set New Nothing