Releases: LorettaDevs/Loretta
Releases · LorettaDevs/Loretta
v0.2.7-beta.6
Added
- Added support for FiveM's hash strings (thanks to @TheGreatSageEqualToHeaven).
NOTE: There is currently no support for creating hash string literal nodes fromSyntaxFactory
because the API for
that still hasn't been decided on. If you need to create a node for it useSyntaxFactory.ParseExpression
.
v0.2.7-beta.5
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
(wasStartEqualsToken
). 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
andwhile
; - 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
withIsMissing
set totrue
). - Changed the generated statement in the case of a missing expression (now it is an
ExpressionStatementSyntax
withIsMissing
set totrue
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
Changed
- Fixed a typo in
EmptyStatementSyntax
and its helper methods.
v0.2.7-beta.3
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
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 namedargs
.
v0.2.7-beta.1
Added
- Add note about non-
CompilationUnitSyntax
rooted trees inScript
.
Changed
- Add validation for
default
immutable arrays of syntax trees inScript
. FileScope
s are now only generated forCompilationUnitSyntax
es.
Fixed
- Fix
FindScope
not returning anything for root statements. - Fix
CompilationUnitSyntax
es not having any associated scopes.
v0.2.6
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 intoa : 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 intoa [ a ]
). - Fix empty table formatting (
{}
instead of{ }
). - Fix excessive spacing around parenthesis.
Syntax
- Fix missing
SyntaxKind
s forUnaryExpressionSyntax
andBinaryExpressionSyntax
inSyntax.xml
.
v0.2.5
Added
- Add parameterless ctor of
Script
andScript.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
andSyntaxFacts.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
andIVariable
to only allow internal implementations. - Make
IGotoLabel.LabelSyntax
nullable to account for the case where the label has no declarations.
v0.2.4
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
andLoretta.CodeAnalysis.Lua.Experimental
; - Add CD flow to publish packages to a public myget.org (not nuget.org) feed.
v0.2.3
Changes:
- Updated
Syntax.xml
to includeBangToken
inUnaryExpressionSyntax
andBangEqualsToken
inBinaryExpressionSyntax
; - Implemented
\z
whitespace voider escape for short strings; - Fixed infinite loop in
LuaSyntaxWalker
with emptyStatementList
s; - Implemented
SourceTextReader
as an attempt to reduce allocations when lexing; - Removed GParse dependency (side effect of
SourceTextReader
).