Skip to content

Commit 6c3c401

Browse files
committed
Merge pull request #29 from rubberduck-vba/next
sync with main repo
2 parents 9b0f4ca + 8ebb362 commit 6c3c401

File tree

7 files changed

+3035
-2890
lines changed

7 files changed

+3035
-2890
lines changed

RetailCoder.VBE/UI/Controls/GroupingGrid/GroupingGrid.xaml renamed to RetailCoder.VBE/Controls/GroupingGrid/GroupingGrid.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<DataGrid x:Class="Rubberduck.UI.Controls.GroupingGrid.GroupingGrid"
1+
<DataGrid x:Class="Rubberduck.Controls.GroupingGrid"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:local="clr-namespace:Rubberduck.UI.Controls"
6+
xmlns:local="clr-namespace:Rubberduck.Controls"
77
mc:Ignorable="d"
88
d:DesignHeight="300" d:DesignWidth="300">
99
<DataGrid.Resources>

RetailCoder.VBE/UI/Controls/GroupingGrid/GroupingGrid.xaml.cs renamed to RetailCoder.VBE/Controls/GroupingGrid/GroupingGrid.xaml.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1-
using System.Windows;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Navigation;
14+
using System.Windows.Shapes;
215

3-
namespace Rubberduck.UI.Controls.GroupingGrid
16+
namespace Rubberduck.Controls
417
{
518
public partial class GroupingGrid
619
{

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
</Reference>
243243
<Reference Include="PresentationCore" />
244244
<Reference Include="PresentationFramework" />
245-
<Reference Include="PresentationFramework.Aero2" />
245+
<Reference Include="PresentationFramework.Aero" />
246246
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
247247
<EmbedInteropTypes>True</EmbedInteropTypes>
248248
</Reference>
@@ -298,7 +298,7 @@
298298
<Compile Include="Common\WinAPI\User32.cs" />
299299
<Compile Include="Common\WinAPI\WindowLongFlags.cs" />
300300
<Compile Include="Common\WinAPI\WM.cs" />
301-
<Compile Include="UI\Controls\GroupingGrid\GroupingGrid.xaml.cs">
301+
<Compile Include="Controls\GroupingGrid\GroupingGrid.xaml.cs">
302302
<DependentUpon>GroupingGrid.xaml</DependentUpon>
303303
</Compile>
304304
<Compile Include="Inspections\CodeInspectionQuickFix.cs" />
@@ -1363,7 +1363,7 @@
13631363
</ProjectReference>
13641364
</ItemGroup>
13651365
<ItemGroup>
1366-
<Page Include="UI\Controls\GroupingGrid\GroupingGrid.xaml">
1366+
<Page Include="Controls\GroupingGrid\GroupingGrid.xaml">
13671367
<SubType>Designer</SubType>
13681368
<Generator>MSBuild:Compile</Generator>
13691369
</Page>

RetailCoder.VBE/UI/ToDoItems/ToDoExplorerControl.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
xmlns:resx="clr-namespace:Rubberduck.UI"
77
xmlns:toDoItems="clr-namespace:Rubberduck.UI.ToDoItems"
88
xmlns:controls="clr-namespace:Rubberduck.Controls"
9-
xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2" x:Class="Rubberduck.UI.ToDoItems.ToDoExplorerControl"
9+
xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" x:Class="Rubberduck.UI.ToDoItems.ToDoExplorerControl"
1010
Language="{UICulture}"
1111
mc:Ignorable="d"
1212
d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance {x:Type toDoItems:ToDoExplorerViewModel}, IsDesignTimeCreatable=False}">
@@ -250,13 +250,13 @@
250250
</Button>
251251
</ToolBar>
252252
</ToolBarTray>
253-
<groupingGrid:GroupingGrid ItemsSource="{Binding ToDos}" AutoGenerateColumns="False"
253+
<controls:GroupingGrid ItemsSource="{Binding ToDos}" AutoGenerateColumns="False"
254254
SelectedItem="{Binding SelectedToDo}" IsExpanded="True"
255255
CanUserReorderColumns="False" IsReadOnly="True"
256256
HorizontalGridLinesBrush="Transparent" VerticalGridLinesBrush="Transparent"
257257
HeadersVisibility="Column" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
258258
ItemContainerStyle="{StaticResource PrettifyRow}" ColumnHeaderHeight="22">
259-
<groupingGrid:GroupingGrid.CellStyle>
259+
<controls:GroupingGrid.CellStyle>
260260
<Style TargetType="{x:Type DataGridCell}">
261261
<Setter Property="BorderThickness" Value="0" />
262262
<Setter Property="VerticalAlignment" Value="Center" />

Rubberduck.Parsing/Grammar/VBA.g4

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ functionStmt :
310310
END_FUNCTION
311311
;
312312

313-
getStmt : GET WS valueStmt WS? ',' WS? valueStmt? WS? ',' WS? valueStmt;
313+
getStmt : GET WS fileNumber WS? ',' WS? valueStmt? WS? ',' WS? valueStmt;
314314

315315
goSubStmt : GOSUB WS valueStmt;
316316

@@ -359,18 +359,18 @@ macroConstStmt : MACRO_CONST WS? ambiguousIdentifier WS? EQ WS? valueStmt;
359359
macroIfThenElseStmt : macroIfBlockStmt macroElseIfBlockStmt* macroElseBlockStmt? MACRO_END_IF;
360360

361361
macroIfBlockStmt :
362-
MACRO_IF WS? ifConditionStmt WS THEN NEWLINE+
363-
(moduleBody NEWLINE+)?
362+
MACRO_IF WS? ifConditionStmt WS THEN NEWLINE*
363+
((moduleDeclarationsElement | moduleBody | block) NEWLINE*)*
364364
;
365365

366366
macroElseIfBlockStmt :
367-
MACRO_ELSEIF WS? ifConditionStmt WS THEN NEWLINE+
368-
(moduleBody NEWLINE+)?
367+
MACRO_ELSEIF WS? ifConditionStmt WS THEN NEWLINE*
368+
((moduleDeclarationsElement | moduleBody | block) NEWLINE*)*
369369
;
370370

371371
macroElseBlockStmt :
372-
MACRO_ELSE NEWLINE+
373-
(moduleBody NEWLINE+)?
372+
MACRO_ELSE NEWLINE*
373+
((moduleDeclarationsElement | moduleBody | block) NEWLINE*)*
374374
;
375375

376376
midStmt : MID WS? LPAREN WS? argsCall WS? RPAREN;
@@ -447,7 +447,7 @@ savepictureStmt : SAVEPICTURE WS valueStmt WS? ',' WS? valueStmt;
447447

448448
saveSettingStmt : SAVESETTING WS valueStmt WS? ',' WS? valueStmt WS? ',' WS? valueStmt WS? ',' WS? valueStmt;
449449

450-
seekStmt : SEEK WS valueStmt WS? ',' WS? valueStmt;
450+
seekStmt : SEEK WS fileNumber WS? ',' WS? valueStmt;
451451

452452
selectCaseStmt :
453453
SELECT WS CASE WS valueStmt NEWLINE+
@@ -500,7 +500,7 @@ typeOfStmt : TYPEOF WS valueStmt (WS IS WS type)?;
500500

501501
unloadStmt : UNLOAD WS valueStmt;
502502

503-
unlockStmt : UNLOCK WS valueStmt (WS? ',' WS? valueStmt (WS TO WS valueStmt)?)?;
503+
unlockStmt : UNLOCK WS fileNumber (WS? ',' WS? valueStmt (WS TO WS valueStmt)?)?;
504504

505505
// operator precedence is represented by rule order
506506
valueStmt :
@@ -552,7 +552,7 @@ whileWendStmt :
552552
WEND
553553
;
554554

555-
widthStmt : WIDTH WS valueStmt WS? ',' WS? valueStmt;
555+
widthStmt : WIDTH WS fileNumber WS? ',' WS? valueStmt;
556556

557557
withStmt :
558558
WITH WS (implicitCallStmt_InStmt | (NEW WS type)) NEWLINE+
@@ -797,8 +797,8 @@ LSET : L S E T;
797797
MACRO_CONST : '#' C O N S T WS;
798798
MACRO_IF : '#' I F WS;
799799
MACRO_ELSEIF : '#' E L S E I F WS;
800-
MACRO_ELSE : '#' E L S E WS;
801-
MACRO_END_IF : '#' E N D WS I F;
800+
MACRO_ELSE : '#' E L S E NEWLINE;
801+
MACRO_END_IF : '#' E N D WS I F NEWLINE;
802802
ME : M E;
803803
MID : M I D;
804804
MKDIR : M K D I R;
@@ -909,7 +909,7 @@ INTEGERLITERAL : (PLUS|MINUS)? ('0'..'9')+ ( ('e' | 'E') INTEGERLITERAL)* ('#' |
909909
DOUBLELITERAL : (PLUS|MINUS)? ('0'..'9')* '.' ('0'..'9')+ ( ('e' | 'E') (PLUS|MINUS)? ('0'..'9')+)* ('#' | '&')?;
910910
BYTELITERAL : ('0'..'9')+;
911911
// identifier
912-
IDENTIFIER : LETTER (LETTERORDIGIT)* | L_SQUARE_BRACKET ((~[!\]\r\n])+ R_SQUARE_BRACKET;
912+
IDENTIFIER : (~[!\]\(\)\r\n\t ])+ | L_SQUARE_BRACKET (~[!\]\r\n])+ R_SQUARE_BRACKET;
913913
// whitespace, line breaks, comments, ...
914914
LINE_CONTINUATION : [ \t]+ '_' '\r'? '\n' -> skip;
915915
NEWLINE : (':' WS?) | (WS? ('\r'? '\n') WS?);

0 commit comments

Comments
 (0)