ix-ax / axsharp

[This repository is for active development.] AX# binds SIMATIC AX based projects with .NET ecosystem.
https://ix-ax.github.io/axsharp/
MIT License
48 stars 11 forks source link

Various fixes after udpate to stc v6 #304

Closed PTKu closed 4 months ago

PTKu commented 4 months ago
  1. The IterateSyntaxTreeForStringLiterals method has been commented out, disabling its execution.
  2. The IterateSyntaxTreeForPragmas method has been uncommented and modified. The token variable now refers to pragmaSyntax and the IsAttributeNamePragmaToken method checks the PragmaContent of the token.
  3. The AddToDictionaryIfLocalizedString method's parameter type has been changed from ISyntaxToken to PragmaSyntax. The TryToGetLocalizedStrings method now checks the PragmaContent of the token.
  4. The pos variable in the AddToDictionaryIfLocalizedString method now gets its value from token.SourceText.GetLineSpan(token.Span).StartLinePosition.
  5. The IsPragmaToken and IsStringToken methods' parameter type has been changed from ISyntaxToken to PragmaSyntax. The check for SyntaxKind.PragmaToken in IsPragmaToken has been commented out.
  6. The IsStringToken method now checks if the SyntaxKind of the token is TypedStringDToken, TypedStringSToken, UntypedStringDToken, or UntypedStringSToken.
  7. The CsOnlinerSourceBuilder and CsPlainSourceBuilder classes have been updated to include a foreach loop that iterates over the UsingDirectives of the fileSyntax object. This loop adds each UsingDirective to the source code with the appropriate namespace. The CsOnlinerSourceBuilder adds the namespace as is, while the CsPlainSourceBuilder prepends "Pocos." to the namespace.
  8. The class_extended_by_known_type.g.cs and file_with_usings.g.cs files have been updated to include additional using directives. These directives import namespaces related to the Simatic.Ax.Stateframework, Simatic.Ax.StatePattern, and various FileWithUsings namespaces.
  9. The class_extended_by_known_type.g.cs and file_with_usings.g.cs files have also been updated to include additional using directives under the Pocos namespace. These directives import the same namespaces as above, but under the Pocos namespace.