From d229c704d2b207125994a5d6870618356e1798ed Mon Sep 17 00:00:00 2001 From: GGG KILLER Date: Sat, 19 Mar 2022 15:07:41 -0300 Subject: [PATCH] Publish a new version. --- CHANGES.md | 2 + LATESTCHANGES.md | 37 +++++++++++++++---- build/LibraryProject.props | 2 +- .../Lua/Portable/PublicAPI.Shipped.txt | 6 ++- .../Lua/Portable/PublicAPI.Unshipped.txt | 4 -- 5 files changed, 37 insertions(+), 14 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f9fe2ddd..b08518e0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased + +## v0.2.9 ### Added - We've added support for LuaJIT imaginary numbers which also resulted in the following being added: - `SyntaxFactory.Literal(Complex value)`; diff --git a/LATESTCHANGES.md b/LATESTCHANGES.md index 43bf22e3..e66b488f 100644 --- a/LATESTCHANGES.md +++ b/LATESTCHANGES.md @@ -1,11 +1,32 @@ ### Added -- Added `LuaSyntaxOptions.AcceptLuaJITNumberSuffixes`. -- Added `SyntaxFactory.Literal(ulong value)`. -- Added `SyntaxFactory.Literal(string text, ulong value)`. -- Added support for `ULL` and `LL` suffixes from LuaJIT. +- We've added support for LuaJIT imaginary numbers which also resulted in the following being added: + - `SyntaxFactory.Literal(Complex value)`; + - `SyntaxFactory.Literal(string text, Complex value)`; + - `SyntaxFactory.Literal(SyntaxTriviaList leading, string text, Complex value, SyntaxTriviaList trailing)`; + - `ObjectDisplay.FormatLiteral(Complex value, ObjectDisplayOptions options, CultureInfo? cultureInfo = null)`. ### Fixed -- Fixed `ObjectDisplay.FormatLiteral(long value, ObjectDisplayOptions options, CultureInfo? cultureInfo = null)` returning numbers in hex for longs. - -### Changed -- Changed `LuaSyntaxOptions.ToString` to return `AcceptLuaJITNumberSuffixes` \ No newline at end of file +- [Breaking] We've reviewed the existing `LuaSyntaxOptions` presets and the following were fixed: + - Changed the Lua 5.1 preset to accept shebangs; + - Changed the Lua 5.1 preset to not accept `if` expressions; + - Changed the Lua 5.2 preset to accept shebangs; + - Changed the Lua 5.2 preset to not accept `if` expressions; + - Changed the Lua 5.3 preset to accept shebangs; + - Changed the Lua 5.3 preset to not accept `if` expressions; + - Changed the Lua 5.3 preset to accept floor division; + - Changed the Lua 5.4 preset to accept shebangs; + - Changed the Lua 5.4 preset to not accept `if` expressions; + - Changed the Lua 5.4 preset to accept floor division; + - Changed the LuaJIT 2.0 preset to not accept empty statements; + - Changed the LuaJIT 2.0 preset to accept shebangs; + - Changed the LuaJIT 2.1 preset to not accept empty statements; + - Changed the LuaJIT 2.1 preset to accept shebangs; + - Changed the FiveM preset to accept shebangs; + - Changed the FiveM preset to not accept `if` expressions; + - Changed the FiveM preset to accept floor division; + - Changed the Luau preset to not accept hex float literals; + - Changed the Luau preset to accept shebangs; + - Changed the Luau preset to not accept bitwise operators. +- Fixed `ObjectDisplay.FormatPrimitive(object? obj, ObjectDisplayOptions options)` returning `null` for `long`s and `ulong`s. +- Fixed LuaJIT suffixes not being handled in a case-insensitive manner. +- Fixed empty type argument lists not being accepted. \ No newline at end of file diff --git a/build/LibraryProject.props b/build/LibraryProject.props index 37ad9219..180a17d9 100644 --- a/build/LibraryProject.props +++ b/build/LibraryProject.props @@ -23,7 +23,7 @@ GGG KILLER GGG KILLER © 2021 - 0.2.9-beta.5 + 0.2.9 true https://github.com/GGG-KILLER/Loretta diff --git a/src/Compilers/Lua/Portable/PublicAPI.Shipped.txt b/src/Compilers/Lua/Portable/PublicAPI.Shipped.txt index 59db2b58..0cc5940e 100644 --- a/src/Compilers/Lua/Portable/PublicAPI.Shipped.txt +++ b/src/Compilers/Lua/Portable/PublicAPI.Shipped.txt @@ -1344,6 +1344,7 @@ static Loretta.CodeAnalysis.Lua.SymbolDisplay.ObjectDisplay.FormatLiteral(bool v static Loretta.CodeAnalysis.Lua.SymbolDisplay.ObjectDisplay.FormatLiteral(double value, Loretta.CodeAnalysis.ObjectDisplayOptions options, System.Globalization.CultureInfo? cultureInfo = null) -> string! static Loretta.CodeAnalysis.Lua.SymbolDisplay.ObjectDisplay.FormatLiteral(long value, Loretta.CodeAnalysis.ObjectDisplayOptions options, System.Globalization.CultureInfo? cultureInfo = null) -> string! static Loretta.CodeAnalysis.Lua.SymbolDisplay.ObjectDisplay.FormatLiteral(string! value, Loretta.CodeAnalysis.ObjectDisplayOptions options) -> string! +static Loretta.CodeAnalysis.Lua.SymbolDisplay.ObjectDisplay.FormatLiteral(System.Numerics.Complex value, Loretta.CodeAnalysis.ObjectDisplayOptions options, System.Globalization.CultureInfo? cultureInfo = null) -> string! static Loretta.CodeAnalysis.Lua.SymbolDisplay.ObjectDisplay.FormatLiteral(ulong value, Loretta.CodeAnalysis.ObjectDisplayOptions options, System.Globalization.CultureInfo? cultureInfo = null) -> string! static Loretta.CodeAnalysis.Lua.SymbolDisplay.ObjectDisplay.FormatPrimitive(object? obj, Loretta.CodeAnalysis.ObjectDisplayOptions options) -> string? static Loretta.CodeAnalysis.Lua.SymbolDisplay.ObjectDisplay.NilLiteral.get -> string! @@ -1465,12 +1466,15 @@ static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(long value) -> Loretta.Cod static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(Loretta.CodeAnalysis.SyntaxTriviaList leading, string! text, double value, Loretta.CodeAnalysis.SyntaxTriviaList trailing) -> Loretta.CodeAnalysis.SyntaxToken static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(Loretta.CodeAnalysis.SyntaxTriviaList leading, string! text, long value, Loretta.CodeAnalysis.SyntaxTriviaList trailing) -> Loretta.CodeAnalysis.SyntaxToken static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(Loretta.CodeAnalysis.SyntaxTriviaList leading, string! text, string! value, Loretta.CodeAnalysis.SyntaxTriviaList trailing) -> Loretta.CodeAnalysis.SyntaxToken +static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(Loretta.CodeAnalysis.SyntaxTriviaList leading, string! text, System.Numerics.Complex value, Loretta.CodeAnalysis.SyntaxTriviaList trailing) -> Loretta.CodeAnalysis.SyntaxToken static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(Loretta.CodeAnalysis.SyntaxTriviaList leading, string! text, ulong value, Loretta.CodeAnalysis.SyntaxTriviaList trailing) -> Loretta.CodeAnalysis.SyntaxToken static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(string! text, double value) -> Loretta.CodeAnalysis.SyntaxToken static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(string! text, long value) -> Loretta.CodeAnalysis.SyntaxToken static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(string! text, string! value) -> Loretta.CodeAnalysis.SyntaxToken +static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(string! text, System.Numerics.Complex value) -> Loretta.CodeAnalysis.SyntaxToken static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(string! text, ulong value) -> Loretta.CodeAnalysis.SyntaxToken static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(string! value) -> Loretta.CodeAnalysis.SyntaxToken +static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(System.Numerics.Complex value) -> Loretta.CodeAnalysis.SyntaxToken static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(ulong value) -> Loretta.CodeAnalysis.SyntaxToken static Loretta.CodeAnalysis.Lua.SyntaxFactory.LiteralExpression(Loretta.CodeAnalysis.Lua.SyntaxKind kind, Loretta.CodeAnalysis.SyntaxToken token) -> Loretta.CodeAnalysis.Lua.Syntax.LiteralExpressionSyntax! static Loretta.CodeAnalysis.Lua.SyntaxFactory.LiteralExpression(Loretta.CodeAnalysis.Lua.SyntaxKind kind) -> Loretta.CodeAnalysis.Lua.Syntax.LiteralExpressionSyntax! @@ -1857,4 +1861,4 @@ virtual Loretta.CodeAnalysis.Lua.LuaSyntaxVisitor.VisitWhileStatement(L virtual Loretta.CodeAnalysis.Lua.LuaSyntaxWalker.VisitLeadingTrivia(Loretta.CodeAnalysis.SyntaxToken token) -> void virtual Loretta.CodeAnalysis.Lua.LuaSyntaxWalker.VisitToken(Loretta.CodeAnalysis.SyntaxToken token) -> void virtual Loretta.CodeAnalysis.Lua.LuaSyntaxWalker.VisitTrailingTrivia(Loretta.CodeAnalysis.SyntaxToken token) -> void -virtual Loretta.CodeAnalysis.Lua.LuaSyntaxWalker.VisitTrivia(Loretta.CodeAnalysis.SyntaxTrivia trivia) -> void \ No newline at end of file +virtual Loretta.CodeAnalysis.Lua.LuaSyntaxWalker.VisitTrivia(Loretta.CodeAnalysis.SyntaxTrivia trivia) -> void diff --git a/src/Compilers/Lua/Portable/PublicAPI.Unshipped.txt b/src/Compilers/Lua/Portable/PublicAPI.Unshipped.txt index 09e0f4de..ab058de6 100644 --- a/src/Compilers/Lua/Portable/PublicAPI.Unshipped.txt +++ b/src/Compilers/Lua/Portable/PublicAPI.Unshipped.txt @@ -1,5 +1 @@ #nullable enable -static Loretta.CodeAnalysis.Lua.SymbolDisplay.ObjectDisplay.FormatLiteral(System.Numerics.Complex value, Loretta.CodeAnalysis.ObjectDisplayOptions options, System.Globalization.CultureInfo? cultureInfo = null) -> string! -static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(Loretta.CodeAnalysis.SyntaxTriviaList leading, string! text, System.Numerics.Complex value, Loretta.CodeAnalysis.SyntaxTriviaList trailing) -> Loretta.CodeAnalysis.SyntaxToken -static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(string! text, System.Numerics.Complex value) -> Loretta.CodeAnalysis.SyntaxToken -static Loretta.CodeAnalysis.Lua.SyntaxFactory.Literal(System.Numerics.Complex value) -> Loretta.CodeAnalysis.SyntaxToken \ No newline at end of file