From 486937b3587e1a997d92d3b946bf031c6018e8e7 Mon Sep 17 00:00:00 2001 From: gambas Date: Thu, 3 Jun 2021 00:14:31 +0200 Subject: [PATCH] Code editor: Take static local variables declaration into account in automatic variable declaration. [DEVELOPMENT ENVIRONMENT] * NEW: Code editor: Take static local variables declaration into account in automatic variable declaration. --- app/src/gambas3/.hidden/font/GambasBold.sfd | 6 +++--- .../gambas3/.hidden/font/GambasRegular.sfd | 6 +++--- app/src/gambas3/.hidden/font/gambasb16.otb | Bin 65380 -> 65380 bytes app/src/gambas3/.hidden/font/gambasr16.otb | Bin 62380 -> 62380 bytes .../gambas3/.src/Editor/Code/FEditor.class | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/src/gambas3/.hidden/font/GambasBold.sfd b/app/src/gambas3/.hidden/font/GambasBold.sfd index 43367dc52..b3721fcfb 100644 --- a/app/src/gambas3/.hidden/font/GambasBold.sfd +++ b/app/src/gambas3/.hidden/font/GambasBold.sfd @@ -45,7 +45,7 @@ NameList: AGL For New Fonts DisplaySize: 16 AntiAlias: 1 FitToEm: 0 -WinInfo: 0 38 13 +WinInfo: 38 38 13 OnlyBitmaps: 1 BeginPrivate: 0 EndPrivate @@ -32705,8 +32705,8 @@ BDFChar: 91 122 9 1 7 0 7 rWWcJ0OV]q BDFChar: 92 123 9 2 7 -1 11 *&''#0JME=0JG17)uos= -BDFChar: 93 124 9 3 4 -3 10 -^qdb$^qdb$^qdb$^q]pM +BDFChar: 93 124 9 3 4 -1 11 +^qdb$^qdb$^qdb$^]4?7 BDFChar: 94 125 9 2 7 -1 11 i%Qi=0JFJ#0JG17huE`W BDFChar: 95 126 9 0 7 9 11 diff --git a/app/src/gambas3/.hidden/font/GambasRegular.sfd b/app/src/gambas3/.hidden/font/GambasRegular.sfd index c2195f289..4f24daeb1 100644 --- a/app/src/gambas3/.hidden/font/GambasRegular.sfd +++ b/app/src/gambas3/.hidden/font/GambasRegular.sfd @@ -50,7 +50,7 @@ NameList: AGL For New Fonts DisplaySize: 16 AntiAlias: 1 FitToEm: 0 -WinInfo: 0 51 15 +WinInfo: 51 51 15 OnlyBitmaps: 1 BeginPrivate: 0 EndPrivate @@ -33104,8 +33104,8 @@ BDFChar: 91 122 9 1 6 0 7 qud9:+@(JT BDFChar: 92 123 9 2 6 -1 11 (a'qD+<\HB+z|E-^r^lEMj2z z@4>*pAmi@h>c$|-Ai}`lumZ&Q57sv-TRkzUj^#jxoWR5<3M{uderrzVU|hwgX!d7_Ntsl7P_XoMg~TPlM5WgH`_b>;}+y$V`gkPkYFGIVK6Xk_VZ!d VEOJLZy9sDM!|g+wJ0Y}n8UUpOHM0N! delta 177 zcmaFzkNL?z<_QW;$2kA+GcdR=U|`s`!PUvf+1xGEoq^#`00RTl4>z|E-$^|gsSFJN zJs21mWZYd`-55j}L>L$xR)F~a!TLsJ*%OoMSoWsK@=biAz@prKcKKuu#-)r3o7XYA z+OZolm@?=xm`wgg+yf#x&ZKBT!5LR+T+0Kfk;wEzGB diff --git a/app/src/gambas3/.hidden/font/gambasr16.otb b/app/src/gambas3/.hidden/font/gambasr16.otb index b97bb69fa0d14a9077ebc14aaca628573ae60919..31ac10157ff01e64f863c501b70ba25ecd3cc2e7 100644 GIT binary patch delta 168 zcmZ4UoO#W2<_QW;#;PVJ3=9?;3=BJGxjOkcpPoAV1OvmzBMc0TXWZOEd?)W>F zc>)6igN(b2s~dwTg9rnIaR7+#AFOW_T0b$VjwNUH-inD&6j%=P8eg8w!MKz$Ve>l1 zcLwZ63>FN!45pJ88>zAwS?HQ>K4bKgTabf=iIJhfK|uh*U|`sM&F;_^kvr)6igN(b2s~dwTg9rnIaR7+#AFOW_YCkcljwNfw&hm**6j(eL@%T^XU|h-&B5#nG>GB$A?3SZ`dqOI E0Lb<+h5!Hn diff --git a/app/src/gambas3/.src/Editor/Code/FEditor.class b/app/src/gambas3/.src/Editor/Code/FEditor.class index dac6f45eb..c9ad24db3 100644 --- a/app/src/gambas3/.src/Editor/Code/FEditor.class +++ b/app/src/gambas3/.src/Editor/Code/FEditor.class @@ -1597,7 +1597,7 @@ Public Function GetSymbolType(sSymbol As String, Optional bPoint As Boolean) As If aSym[0] = "END" Then Break Endif If aSym.Count >= 4 Then - If aSym[0] = "DIM" Then + If aSym[0] = "DIM" Or If aSym[0] = "STATIC" Then If ReadLocalSymbolType(aSym, 1, sSymbol, $hVirtualSymbol) Then With $hVirtualSymbol '.Name = aSym[1] @@ -1605,6 +1605,7 @@ Public Function GetSymbolType(sSymbol As String, Optional bPoint As Boolean) As .Kind = "l" .LineNumber = iLine + 1 .NotPublic = True + .IsStatic = aSym[0] = "STATIC" '.Type = sType End With $hSymbol = $hVirtualSymbol @@ -3657,7 +3658,7 @@ Private Sub AddLocalVariable(sName As String, sType As String) If sLine And If Left(sLine) <> "'" Then Highlight.Analyze(sLine) - If Highlight.Symbols[0] = "DIM" Then + If Highlight.Symbols[0] = "DIM" Or If Highlight.Symbols[0] = "STATIC" Then iIndent = GetIndent($hEditor[I].Text) Else If GetIndent($hEditor[I].Text) <= iIndent Then Break