Skip to content

Releases: LorettaDevs/Loretta

v0.2.7-beta.6

31 Dec 02:24
Compare
Choose a tag to compare
v0.2.7-beta.6 Pre-release
Pre-release

Added

  • Added support for FiveM's hash strings (thanks to @TheGreatSageEqualToHeaven).
    NOTE: There is currently no support for creating hash string literal nodes from SyntaxFactory because the API for
    that still hasn't been decided on. If you need to create a node for it use SyntaxFactory.ParseExpression.

v0.2.7-beta.5

28 Dec 16:49
Compare
Choose a tag to compare
v0.2.7-beta.5 Pre-release
Pre-release

Added

  • Added support for Luau's if expression.

Fixed

  • Fixed errors not being reported for missing expressions.
  • Fixed an error not being reported when a compound assignment is parsed and AcceptCompoundAssignment is false.
  • Fixed typo in SyntaxKind.StarEqualsToken (was StartEqualsToken).
  • SyntaxNormalizer fixes by @bmcq-0 in #37:
    • Fixed chained unary operators spacing;
    • Fixed spaces before semicolons;
    • Fixed missing space after assignment operator;
    • Fixed spaces being inserted inside parenthesis;
    • Fixed spacing inside table constructors;
    • Fixed spacing after ìf, elseif, until and while;
    • Fixed two line breaks being inserted after certain statements;
    • Fixed line breaks being inserted before semicolons;
    • Fixed line breaks being inserted twice between statements.

Changed

  • Changed the generated expression in the case of a missing expression (now it is a IdentifierNameSyntax
    with IsMissing set to true).
  • Changed the generated statement in the case of a missing expression (now it is an ExpressionStatementSyntax
    with IsMissing set to true and the inner expression is the one in the bullet point above).
  • Changed the generated error message in the case of a missing/invalid statement.

v0.2.7-beta.4

13 Dec 19:28
Compare
Choose a tag to compare
v0.2.7-beta.4 Pre-release
Pre-release

Changed

  • Fixed a typo in EmptyStatementSyntax and its helper methods.

v0.2.7-beta.3

27 Nov 16:36
Compare
Choose a tag to compare
v0.2.7-beta.3 Pre-release
Pre-release

Removed

  • Removed unused classes we got when vendoring Roslyn, of which, the following were public:
    • Loretta.CodeAnalysis.SourceFileResolver;
    • Loretta.CodeAnalysis.AnalyzerConfig;
    • Loretta.CodeAnalysis.AnalyzerConfigOptionsResult;
    • Loretta.CodeAnalysis.AnalyzerConfigSet;
    • Loretta.CodeAnalysis.ErrorLogOptions;
    • Loretta.CodeAnalysis.SarifVersion;
    • Loretta.CodeAnalysis.SarifVersionFacts.
  • The following references were removed:
    • Microsoft.CodeAnalysis.Analyzers;
    • System.Reflection.Metadata.
  • The following references were removed for the .NET Core 3.1 build:
    • System.Collections.Immutable;
    • System.Memory;
    • System.Runtime.CompilerServices.Unsafe;
    • System.Threading.Tasks.Extensions.

v0.2.7-beta.2

24 Nov 15:33
Compare
Choose a tag to compare
v0.2.7-beta.2 Pre-release
Pre-release

Added

  • Add support for implicit self parameter in methods.

Fixed

  • Fix parameters not having an IVariable associated with them.

Changed

  • Fix file-level implicit arg parameter being named args.

v0.2.7-beta.1

17 Nov 01:38
Compare
Choose a tag to compare
v0.2.7-beta.1 Pre-release
Pre-release

Added

  • Add note about non-CompilationUnitSyntax rooted trees in Script.

Changed

  • Add validation for default immutable arrays of syntax trees in Script.
  • FileScopes are now only generated for CompilationUnitSyntaxes.

Fixed

  • Fix FindScope not returning anything for root statements.
  • Fix CompilationUnitSyntaxes not having any associated scopes.

v0.2.6

12 Nov 01:53
Compare
Choose a tag to compare

Added

  • Add better formatting for tables when they're multiline.

Fixed

Scoping

  • Fix SimpleFunctionName handling to:
    • Not always add it as a write when it's part of a composite name.
    • Not assign the simple name variable to the entire name when it's a composite one.

Formatting

  • Fix formatting of : (a:b was being turned into a : b).
  • Fix multiple line breaks being inserted when formatting.
  • Fix line breaks not being added after single line comments.
  • Fix formatting of [ and ] (a[a] was being turned into a [ a ]).
  • Fix empty table formatting ({} instead of { }).
  • Fix excessive spacing around parenthesis.

Syntax

  • Fix missing SyntaxKinds for UnaryExpressionSyntax and BinaryExpressionSyntax in Syntax.xml.

v0.2.5

30 Oct 02:09
Compare
Choose a tag to compare

Added

  • Add parameterless ctor of Script and Script.Empty for easier creation of empty scripts.
  • Add support for SimpleFunctionName in variable handling (local vars didn't have a write added to them and a global wasn't created if a local with the same name didn't exist).
  • Add SyntaxFacts.IsOperatorToken, SyntaxFacts.IsUnaryOperatorToken and SyntaxFacts.IsBinaryOperatorToken.
  • Add Script.FindScope.

Fixed

  • Fix jumps to non-existent labels (labels that don't have a ::label::) not creating a new label.
  • Fix jumps to a goto label not being added to the IGotoLabel.

Changed

  • Configure IFileScope, IFunctionScope, IGotoLabel, IScope and IVariable to only allow internal implementations.
  • Make IGotoLabel.LabelSyntax nullable to account for the case where the label has no declarations.

v0.2.4

16 Apr 14:17
Compare
Choose a tag to compare

Changes:

  • [Breaking] Changed what is accepted as whitespace to not be unicode-aware (as lua isn't);
  • Fix SyntaxNormalizer adding a space after .s;
  • Implement the ConstantFolder;
  • Add nuget params to Loretta.CodeAnalysis, Loretta.CodeAnalysis.Lua and Loretta.CodeAnalysis.Lua.Experimental;
  • Add CD flow to publish packages to a public myget.org (not nuget.org) feed.

v0.2.3

11 Apr 19:03
Compare
Choose a tag to compare

Changes:

  • Updated Syntax.xml to include BangToken in UnaryExpressionSyntax and BangEqualsToken in BinaryExpressionSyntax;
  • Implemented \z whitespace voider escape for short strings;
  • Fixed infinite loop in LuaSyntaxWalker with empty StatementLists;
  • Implemented SourceTextReader as an attempt to reduce allocations when lexing;
  • Removed GParse dependency (side effect of SourceTextReader).