File tree Expand file tree Collapse file tree
tests/AXSharp.CompilerTests/Core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -743,7 +743,22 @@ public void Accept(IArrayRepetitionInitializerSyntax arrayRepetitionInitializerS
743743 void ISyntaxNodeVisitor < ICombinedThreeVisitor > . Accept ( IArrayTypeDeclarationSyntax arrayTypeDeclarationSyntax ,
744744 ICombinedThreeVisitor data )
745745 {
746- throw new NotSupportedException ( ) ;
746+ try
747+ {
748+ // Read Locations SourceText property using reflection.
749+ var locationType = arrayTypeDeclarationSyntax . Location . GetType ( ) ;
750+ var sourceTextProperty = locationType . GetProperty ( "SourceText" ) ;
751+ var sourceText = sourceTextProperty ? . GetValue ( arrayTypeDeclarationSyntax . Location ) ;
752+ var sourceTextType = sourceText ? . GetType ( ) ;
753+ var fileNameProperty = sourceTextType ? . GetProperty ( "Filename" ) ?? sourceTextType ? . GetProperty ( "FileName" ) ;
754+ var fileName = fileNameProperty ? . GetValue ( sourceText ) as string ?? "unknown file" ;
755+
756+ Log . Logger . Warning ( $ "Array types as declared in '{ fileName } ' are not supported at this time.") ;
757+ }
758+ catch ( Exception )
759+ {
760+ Log . Logger . Warning ( $ "Array types as declared in 'an unknown location' are not supported at this time.") ;
761+ }
747762 }
748763
749764 void ISyntaxNodeVisitor < ICombinedThreeVisitor > . Accept ( IAsmStatementSyntax asmStatementSyntax ,
Original file line number Diff line number Diff line change 4040 "axopen-traversal" : {
4141 "commandName" : " Project" ,
4242 "commandLineArgs" : " --verbosity Information" ,
43- "workingDirectory" : " C :\\ W\\ Develop\\ gh\\ inxton\\ simatic-ax\\ axopen.templates \\ axopen \\ src\\ traversals\\ apax\\ "
43+ "workingDirectory" : " c :\\ W\\ Develop\\ gh\\ inxton\\ simatic-ax\\ axopen-1 \\ AXOpen \\ src\\ traversals\\ apax\\ "
4444 },
4545 "axopen-core" : {
4646 "commandName" : " Project" ,
Original file line number Diff line number Diff line change @@ -921,7 +921,7 @@ public void CanCallAcceptForISyntaxNodeVisitor_ICombinedThreeVisitor_WithArrayTy
921921 var data = new Mock < ICombinedThreeVisitor > ( ) . Object ;
922922
923923 // Act
924- Assert . Throws < NotSupportedException > ( ( ) => ( ( ISyntaxNodeVisitor < ICombinedThreeVisitor > ) _testClass ) . Accept ( arrayTypeDeclarationSyntax , data ) ) ;
924+ ( ( ISyntaxNodeVisitor < ICombinedThreeVisitor > ) _testClass ) . Accept ( arrayTypeDeclarationSyntax , data ) ;
925925
926926 // Assert
927927
You can’t perform that action at this time.
0 commit comments