Releases: LorettaDevs/Loretta
Releases · LorettaDevs/Loretta
v0.2.11-nightly.5
Fixed
- Fixed
ContainedScopes
not being populated.
v0.2.10
Added
- Added the following new
SyntaxFactory
overloads to partially restore compatibility with pre-typed-lua era:SyntaxFactory.AnonymousFunctionExpression(ParameterListSyntax parameters, StatementListSyntax body)
;SyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
;SyntaxFactory.LocalDeclarationName(IdentifierNameSyntax identifierName, VariableAttributeSyntax? attribute)
;SyntaxFactory.LocalDeclarationName(string name, VariableAttributeSyntax? attribute)
;SyntaxFactory.LocalFunctionDeclarationStatement(SyntaxToken localKeyword, SyntaxToken functionKeyword, IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
;SyntaxFactory.NumericForStatement(IdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
;SyntaxFactory.NumericForStatement(SyntaxToken forKeyword, IdentifierNameSyntax identifier, SyntaxToken equalsToken, ExpressionSyntax initialValue, SyntaxToken finalValueCommaToken, ExpressionSyntax finalValue, SyntaxToken stepValueCommaToken, ExpressionSyntax? stepValue, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
;SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
;SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
.
- Added support for typed Lua in
.NormalizeWhitespace
; - Added support for local variable attributes in
.NormalizeWhitespace
; - Added the new
SyntaxFactory.MethodFunctionName(FunctionNameSyntax baseName, string name)
overload. - Added support for Lua 5.1's long string nesting error.
Changed
- [Breaking] The following SyntaxFactory overloads have been changed:
SyntaxFactory.NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
has been changed to always require the loop's body (intoSyntaxFactory.NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
);SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
has been changed to always require the loop's body (intoSyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
);SyntaxFactory.IfStatement(ExpressionSyntax condition)
has been changed to always require the clause's body (intoSyntaxFactory.IfStatement(ExpressionSyntax condition, StatementListSyntax body)
);SyntaxFactory.ElseClause(StatementListSyntax? elseBody = default)
has been changed for the body to always be required (intoSyntaxFactory.ElseClause(StatementListSyntax elseBody)
);SyntaxFactory.LocalFunctionDeclarationStatement(IdentifierNameSyntax name)
has been changed to always require the parameter list and function's body (intoSyntaxFactory.LocalFunctionDeclarationStatement(IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.LocalFunctionDeclarationStatement(string name)
has been changed to always require the parameter list and function's body (intoLocalFunctionDeclarationStatement(string name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name)
has been changed to always require the parameter list and the function's body (intoSyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.DoStatement(StatementListSyntax? body = default)
has been changed to make the body always required (intoSyntaxFactory.DoStatement(StatementListSyntax body)
);SyntaxFactory.CompilationUnit(StatementListSyntax? statements = default)
has been changed to make the body always required (intoSyntaxFactory.CompilationUnit(StatementListSyntax statements)
).
- Changed the existing handling of certain constructs in
.NormalizeWhitespace
:- Tables are now kept in a single line unless one of its fields spans more than one line;
- Spaces are not added to a table if it has no elements;
- No unnecessary line breaks are added after statements anymore.
- [Breaking]
SyntaxFactory.IdentifierName
will now throw an exception if the provided token is not an identifier. - [Breaking] The following have been changed as a result of the Lua 5.1 long string nesting error:
LuaSyntaxOptions
's constructor and.With
method have been changed to accept the newAcceptNestingOfLongStrings
option.- An error is now generated when long strings are nested and
LuaSyntaxOptions.AcceptNestingOfLongStrings
isfalse
.
Removed
- [Breaking] The following have been removed:
SyntaxFactory.AnonymousFunctionExpression()
(as the parameter list and function's body should always be required);SyntaxFactory.GenericForStatement(SeparatedSyntaxList<TypedIdentifierNameSyntax> identifiers, SeparatedSyntaxList<ExpressionSyntax> expressions)
(as the loop's body should always be required);SyntaxFactory.WhileStatement(ExpressionSyntax condition)
(as the loop's body should always be required);SyntaxFactory.RepeatUntilStatement(ExpressionSyntax condition)
(as the loop's body should always be required);SyntaxFactory.ElseIfClause(ExpressionSyntax condition)
(as theelseif
clause should always be required);
- [Breaking] The
SyntaxKind.StartEqualsToken
has been removed as it has been obsolete for a while.
Fixed
- Fixed a bug where the leading new line was included for long strings;
- Fixed a bug where
ObjectDisplay.FormatLiteral(string value, ObjectDisplayOptions options)
would escape the space character; - Fixed a bug where
ObjectDisplay.FormatLiteral(string value, ObjectDisplayOptions options)
would not generate correct verbatim/long strings; - Fixed parsing of anonymous functions that had type parameters;
- Fixed union and intersection types having errors for bitwise operators generated in them.
v0.2.10-nightly.96
Added
- Added the following new
SyntaxFactory
overloads to partially restore compatibility with pre-typed-lua era:SyntaxFactory.AnonymousFunctionExpression(ParameterListSyntax parameters, StatementListSyntax body)
;SyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
;SyntaxFactory.LocalDeclarationName(IdentifierNameSyntax identifierName, VariableAttributeSyntax? attribute)
;SyntaxFactory.LocalDeclarationName(string name, VariableAttributeSyntax? attribute)
;SyntaxFactory.LocalFunctionDeclarationStatement(SyntaxToken localKeyword, SyntaxToken functionKeyword, IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
;SyntaxFactory.NumericForStatement(IdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
;SyntaxFactory.NumericForStatement(SyntaxToken forKeyword, IdentifierNameSyntax identifier, SyntaxToken equalsToken, ExpressionSyntax initialValue, SyntaxToken finalValueCommaToken, ExpressionSyntax finalValue, SyntaxToken stepValueCommaToken, ExpressionSyntax? stepValue, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
;SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
;SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
.
- Added support for typed Lua in
.NormalizeWhitespace
; - Added support for local variable attributes in
.NormalizeWhitespace
; - Added the new
SyntaxFactory.MethodFunctionName(FunctionNameSyntax baseName, string name)
overload.
Changed
- [Breaking] The following SyntaxFactory overloads have been changed:
SyntaxFactory.NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
has been changed to always require the loop's body (intoSyntaxFactory.NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
);SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
has been changed to always require the loop's body (intoSyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
);SyntaxFactory.IfStatement(ExpressionSyntax condition)
has been changed to always require the clause's body (intoSyntaxFactory.IfStatement(ExpressionSyntax condition, StatementListSyntax body)
);SyntaxFactory.ElseClause(StatementListSyntax? elseBody = default)
has been changed for the body to always be required (intoSyntaxFactory.ElseClause(StatementListSyntax elseBody)
);SyntaxFactory.LocalFunctionDeclarationStatement(IdentifierNameSyntax name)
has been changed to always require the parameter list and function's body (intoSyntaxFactory.LocalFunctionDeclarationStatement(IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.LocalFunctionDeclarationStatement(string name)
has been changed to always require the parameter list and function's body (intoLocalFunctionDeclarationStatement(string name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name)
has been changed to always require the parameter list and the function's body (intoSyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.DoStatement(StatementListSyntax? body = default)
has been changed to make the body always required (intoSyntaxFactory.DoStatement(StatementListSyntax body)
);SyntaxFactory.CompilationUnit(StatementListSyntax? statements = default)
has been changed to make the body always required (intoSyntaxFactory.CompilationUnit(StatementListSyntax statements)
).
- Changed the existing handling of certain constructs in
.NormalizeWhitespace
:- Tables are now kept in a single line unless one of its fields spans more than one line;
- Spaces are not added to a table if it has no elements;
- No unnecessary line breaks are added after statements anymore.
- [Breaking]
SyntaxFactory.IdentifierName
will now throw an exception if the provided token is not an identifier.
Removed
- [Breaking] The following have been removed:
SyntaxFactory.AnonymousFunctionExpression()
(as the parameter list and function's body should always be required);SyntaxFactory.GenericForStatement(SeparatedSyntaxList<TypedIdentifierNameSyntax> identifiers, SeparatedSyntaxList<ExpressionSyntax> expressions)
(as the loop's body should always be required);SyntaxFactory.WhileStatement(ExpressionSyntax condition)
(as the loop's body should always be required);SyntaxFactory.RepeatUntilStatement(ExpressionSyntax condition)
(as the loop's body should always be required);SyntaxFactory.ElseIfClause(ExpressionSyntax condition)
(as theelseif
clause should always be required);
- [Breaking] The
SyntaxKind.StartEqualsToken
has been removed as it has been obsolete for a while.
Fixed
- Fixed a bug where the leading new line was included for long strings;
- Fixed a bug where
ObjectDisplay.FormatLiteral(string value, ObjectDisplayOptions options)
would escape the space character; - Fixed a bug where
ObjectDisplay.FormatLiteral(string value, ObjectDisplayOptions options)
would not generate correct verbatim/long strings; - Fixed parsing of anonymous functions that had type parameters;
- Fixed union and intersection types having errors for bitwise operators generated in them.
v0.2.10-nightly.94
Added
- Added the following new
SyntaxFactory
overloads to partially restore compatibility with pre-typed-lua era:SyntaxFactory.AnonymousFunctionExpression(ParameterListSyntax parameters, StatementListSyntax body)
;SyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
;SyntaxFactory.LocalDeclarationName(IdentifierNameSyntax identifierName, VariableAttributeSyntax? attribute)
;SyntaxFactory.LocalDeclarationName(string name, VariableAttributeSyntax? attribute)
;SyntaxFactory.LocalFunctionDeclarationStatement(SyntaxToken localKeyword, SyntaxToken functionKeyword, IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
;SyntaxFactory.NumericForStatement(IdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
;SyntaxFactory.NumericForStatement(SyntaxToken forKeyword, IdentifierNameSyntax identifier, SyntaxToken equalsToken, ExpressionSyntax initialValue, SyntaxToken finalValueCommaToken, ExpressionSyntax finalValue, SyntaxToken stepValueCommaToken, ExpressionSyntax? stepValue, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
;SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
;SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
.
- Added support for typed Lua in
.NormalizeWhitespace
; - Added support for local variable attributes in
.NormalizeWhitespace
; - Added the new
SyntaxFactory.MethodFunctionName(FunctionNameSyntax baseName, string name)
overload.
Changed
- [Breaking] The following SyntaxFactory overloads have been changed:
SyntaxFactory.NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
has been changed to always require the loop's body (intoSyntaxFactory.NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
);SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
has been changed to always require the loop's body (intoSyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
);SyntaxFactory.IfStatement(ExpressionSyntax condition)
has been changed to always require the clause's body (intoSyntaxFactory.IfStatement(ExpressionSyntax condition, StatementListSyntax body)
);SyntaxFactory.ElseClause(StatementListSyntax? elseBody = default)
has been changed for the body to always be required (intoSyntaxFactory.ElseClause(StatementListSyntax elseBody)
);SyntaxFactory.LocalFunctionDeclarationStatement(IdentifierNameSyntax name)
has been changed to always require the parameter list and function's body (intoSyntaxFactory.LocalFunctionDeclarationStatement(IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.LocalFunctionDeclarationStatement(string name)
has been changed to always require the parameter list and function's body (intoLocalFunctionDeclarationStatement(string name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name)
has been changed to always require the parameter list and the function's body (intoSyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.DoStatement(StatementListSyntax? body = default)
has been changed to make the body always required (intoSyntaxFactory.DoStatement(StatementListSyntax body)
);SyntaxFactory.CompilationUnit(StatementListSyntax? statements = default)
has been changed to make the body always required (intoSyntaxFactory.CompilationUnit(StatementListSyntax statements)
).
- Changed the existing handling of certain constructs in
.NormalizeWhitespace
:- Tables are now kept in a single line unless one of its fields spans more than one line;
- Spaces are not added to a table if it has no elements;
- No unnecessary line breaks are added after statements anymore.
- [Breaking]
SyntaxFactory.IdentifierName
will now throw an exception if the provided token is not an identifier.
Removed
- [Breaking] The following have been removed:
SyntaxFactory.AnonymousFunctionExpression()
(as the parameter list and function's body should always be required);SyntaxFactory.GenericForStatement(SeparatedSyntaxList<TypedIdentifierNameSyntax> identifiers, SeparatedSyntaxList<ExpressionSyntax> expressions)
(as the loop's body should always be required);SyntaxFactory.WhileStatement(ExpressionSyntax condition)
(as the loop's body should always be required);SyntaxFactory.RepeatUntilStatement(ExpressionSyntax condition)
(as the loop's body should always be required);SyntaxFactory.ElseIfClause(ExpressionSyntax condition)
(as theelseif
clause should always be required);
- [Breaking] The
SyntaxKind.StartEqualsToken
has been removed as it has been obsolete for a while.
Fixed
- Fixed a bug where the leading new line was included for long strings;
- Fixed a bug where
ObjectDisplay.FormatLiteral(string value, ObjectDisplayOptions options)
would escape the space character; - Fixed a bug where
ObjectDisplay.FormatLiteral(string value, ObjectDisplayOptions options)
would not generate correct verbatim/long strings; - Fixed parsing of anonymous functions that had type parameters;
- Fixed union and intersection types having errors for bitwise operators generated in them.
v0.2.10-nightly.81
Added
- Added the following new
SyntaxFactory
overloads to partially restore compatibility with pre-typed-lua era:SyntaxFactory.AnonymousFunctionExpression(ParameterListSyntax parameters, StatementListSyntax body)
;SyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
;SyntaxFactory.LocalDeclarationName(IdentifierNameSyntax identifierName, VariableAttributeSyntax? attribute)
;SyntaxFactory.LocalDeclarationName(string name, VariableAttributeSyntax? attribute)
;SyntaxFactory.LocalFunctionDeclarationStatement(SyntaxToken localKeyword, SyntaxToken functionKeyword, IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
;SyntaxFactory.NumericForStatement(IdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
;SyntaxFactory.NumericForStatement(SyntaxToken forKeyword, IdentifierNameSyntax identifier, SyntaxToken equalsToken, ExpressionSyntax initialValue, SyntaxToken finalValueCommaToken, ExpressionSyntax finalValue, SyntaxToken stepValueCommaToken, ExpressionSyntax? stepValue, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
;SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
;SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
.
- Added support for typed Lua in
.NormalizeWhitespace
; - Added support for local variable attributes in
.NormalizeWhitespace
.
Changed
- [Breaking] The following SyntaxFactory overloads have been changed:
SyntaxFactory.NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
has been changed to always require the loop's body (intoSyntaxFactory.NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
);SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
has been changed to always require the loop's body (intoSyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
);SyntaxFactory.IfStatement(ExpressionSyntax condition)
has been changed to always require the clause's body (intoSyntaxFactory.IfStatement(ExpressionSyntax condition, StatementListSyntax body)
);SyntaxFactory.ElseClause(StatementListSyntax? elseBody = default)
has been changed for the body to always be required (intoSyntaxFactory.ElseClause(StatementListSyntax elseBody)
);SyntaxFactory.LocalFunctionDeclarationStatement(IdentifierNameSyntax name)
has been changed to always require the parameter list and function's body (intoSyntaxFactory.LocalFunctionDeclarationStatement(IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.LocalFunctionDeclarationStatement(string name)
has been changed to always require the parameter list and function's body (intoLocalFunctionDeclarationStatement(string name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name)
has been changed to always require the parameter list and the function's body (intoSyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.DoStatement(StatementListSyntax? body = default)
has been changed to make the body always required (intoSyntaxFactory.DoStatement(StatementListSyntax body)
);SyntaxFactory.CompilationUnit(StatementListSyntax? statements = default)
has been changed to make the body always required (intoSyntaxFactory.CompilationUnit(StatementListSyntax statements)
).
- Changed the existing handling of certain constructs in
.NormalizeWhitespace
:- Tables are now kept in a single line unless one of its fields spans more than one line;
- Spaces are not added to a table if it has no elements;
- No unnecessary line breaks are added after statements anymore.
Removed
- [Breaking] The following have been removed:
SyntaxFactory.AnonymousFunctionExpression()
(as the parameter list and function's body should always be required);SyntaxFactory.GenericForStatement(SeparatedSyntaxList<TypedIdentifierNameSyntax> identifiers, SeparatedSyntaxList<ExpressionSyntax> expressions)
(as the loop's body should always be required);SyntaxFactory.WhileStatement(ExpressionSyntax condition)
(as the loop's body should always be required);SyntaxFactory.RepeatUntilStatement(ExpressionSyntax condition)
(as the loop's body should always be required);SyntaxFactory.ElseIfClause(ExpressionSyntax condition)
(as theelseif
clause should always be required);
Fixed
- Fixed a bug where the leading new line was included for long strings;
- Fixed a bug where
ObjectDisplay.FormatLiteral(string value, ObjectDisplayOptions options)
would escape the space character; - Fixed a bug where
ObjectDisplay.FormatLiteral(string value, ObjectDisplayOptions options)
would not generate correct verbatim/long strings; - Fixed parsing of anonymous functions that had type parameters.
v0.2.10-nightly.73
Added
- Added the following new
SyntaxFactory
overloads to partially restore compatibility with pre-typed-lua era:SyntaxFactory.AnonymousFunctionExpression(ParameterListSyntax parameters, StatementListSyntax body)
;SyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
;SyntaxFactory.LocalDeclarationName(IdentifierNameSyntax identifierName, VariableAttributeSyntax? attribute)
;SyntaxFactory.LocalDeclarationName(string name, VariableAttributeSyntax? attribute)
;SyntaxFactory.LocalFunctionDeclarationStatement(SyntaxToken localKeyword, SyntaxToken functionKeyword, IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
;SyntaxFactory.NumericForStatement(IdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
;SyntaxFactory.NumericForStatement(SyntaxToken forKeyword, IdentifierNameSyntax identifier, SyntaxToken equalsToken, ExpressionSyntax initialValue, SyntaxToken finalValueCommaToken, ExpressionSyntax finalValue, SyntaxToken stepValueCommaToken, ExpressionSyntax? stepValue, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
;SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
;SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
.
Changed
- [Breaking] The following SyntaxFactory overloads have been changed:
SyntaxFactory.NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
has been changed to always require the loop's body (intoSyntaxFactory.NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
);SyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue)
has been changed to always require the loop's body (intoSyntaxFactory.NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
);SyntaxFactory.IfStatement(ExpressionSyntax condition)
has been changed to always require the clause's body (intoSyntaxFactory.IfStatement(ExpressionSyntax condition, StatementListSyntax body)
);SyntaxFactory.ElseClause(StatementListSyntax? elseBody = default)
has been changed for the body to always be required (intoSyntaxFactory.ElseClause(StatementListSyntax elseBody)
);SyntaxFactory.LocalFunctionDeclarationStatement(IdentifierNameSyntax name)
has been changed to always require the parameter list and function's body (intoSyntaxFactory.LocalFunctionDeclarationStatement(IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.LocalFunctionDeclarationStatement(string name)
has been changed to always require the parameter list and function's body (intoLocalFunctionDeclarationStatement(string name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name)
has been changed to always require the parameter list and the function's body (intoSyntaxFactory.FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
);SyntaxFactory.DoStatement(StatementListSyntax? body = default)
has been changed to make the body always required (intoSyntaxFactory.DoStatement(StatementListSyntax body)
);SyntaxFactory.CompilationUnit(StatementListSyntax? statements = default)
has been changed to make the body always required (intoSyntaxFactory.CompilationUnit(StatementListSyntax statements)
).
Removed
- [Breaking] The following have been removed:
SyntaxFactory.AnonymousFunctionExpression()
(as the parameter list and function's body should always be required);SyntaxFactory.GenericForStatement(SeparatedSyntaxList<TypedIdentifierNameSyntax> identifiers, SeparatedSyntaxList<ExpressionSyntax> expressions)
(as the loop's body should always be required);SyntaxFactory.WhileStatement(ExpressionSyntax condition)
(as the loop's body should always be required);SyntaxFactory.RepeatUntilStatement(ExpressionSyntax condition)
(as the loop's body should always be required);SyntaxFactory.ElseIfClause(ExpressionSyntax condition)
(as theelseif
clause should always be required);
Fixed
- Fixed a bug where the leading new line was included for long strings;
- Fixed a bug where
ObjectDisplay.FormatLiteral(string value, ObjectDisplayOptions options)
would escape the space character; - Fixed a bug where
ObjectDisplay.FormatLiteral(string value, ObjectDisplayOptions options)
would not generate correct verbatim/long strings.
v0.2.9
Added
- 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
- [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)
returningnull
forlong
s andulong
s. - Fixed LuaJIT suffixes not being handled in a case-insensitive manner.
- Fixed empty type argument lists not being accepted.
v0.2.9-beta.5
Added
- Added
LuaSyntaxOptions.AcceptLuaJITNumberSuffixes
. - Added
SyntaxFactory.Literal(ulong value)
. - Added
SyntaxFactory.Literal(string text, ulong value)
. - Added support for
ULL
andLL
suffixes from LuaJIT.
Fixed
- Fixed
ObjectDisplay.FormatLiteral(long value, ObjectDisplayOptions options, CultureInfo? cultureInfo = null)
returning numbers in hex for longs.
Changed
- Changed
LuaSyntaxOptions.ToString
to returnAcceptLuaJITNumberSuffixes
v0.2.9-beta.4
Added
- Added
LuaSyntaxOptions.Luau
.
Changed
- Changed
LuaSyntaxOptions.ToString
to return"Luau"
for the luau preset.
Fixed
- Fixed a bug with incremental parsing where a
System.InvalidCastException
was thrown fromLoretta.CodeAnalysis.Lua.Syntax.InternalSyntax.Blender.Reader.CanReuse
.
v0.2.9-beta.3
Added
- The following were added as a part of implementing typed-luau:
Loretta.CodeAnalysis.Lua.Syntax.TypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TypeBindingSyntax
;Loretta.CodeAnalysis.Lua.Syntax.NilableTypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.ParenthesizedTypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TypePackSyntax
;Loretta.CodeAnalysis.Lua.Syntax.FunctionTypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TableBasedTypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TableTypeElementSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TableTypePropertySyntax
;Loretta.CodeAnalysis.Lua.Syntax.TableTypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TypeCastExpressionSyntax
;Loretta.CodeAnalysis.Lua.Syntax.UnionTypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.IntersectionTypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.EqualsTypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TypeParameterSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TypeParameterListSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TypeArgumentListSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TypeNameSyntax
;Loretta.CodeAnalysis.Lua.Syntax.CompositeTypeNameSyntax
;Loretta.CodeAnalysis.Lua.Syntax.LiteralTypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TypeofTypeSyntax
;Loretta.CodeAnalysis.Lua.Syntax.VariadicTypePackSyntax
;Loretta.CodeAnalysis.Lua.Syntax.GenericTypePackSyntax
;Loretta.CodeAnalysis.Lua.Syntax.TypedIdentifierNameSyntax
;LuaSyntaxOptions.AcceptTypedLua
;
Changed
- [Breaking] The following were changed as a result of implementing typed lua syntax:
LuaSyntaxOptions
's constructor andWith
were changed to accept a bool forAcceptTypedLua
;- The following were changed to accept a
TypeBindingSyntax
:AnonymousFunctionExpressionSyntax.Update
;FunctionDeclarationStatementSyntax.Update
;LocalDeclarationNameSyntax.Update
;LocalFunctionDeclarationStatementSyntax.Update
;NamedParameterSyntax.Update
;VarArgParameterSyntax.Update
;SyntaxFactory.AnonymousFunctionExpression
;SyntaxFactory.FunctionDeclarationStatement
;SyntaxFactory.LocalDeclarationName
;SyntaxFactory.LocalFunctionDeclarationStatement
;SyntaxFactory.VarArgParameter
.
- The following were changed to accept a
TypeParameterListSyntax
:AnonymousFunctionExpressionSyntax.Update
;FunctionDeclarationStatementSyntax.Update
;LocalFunctionDeclarationStatementSyntax.Update
;SyntaxFactory.AnonymousFunctionExpression
;SyntaxFactory.FunctionDeclarationStatement
;SyntaxFactory.LocalFunctionDeclarationStatement
.
- The following were changed to accept (or be) a
TypedIdentifierNameSyntax
:GenericForStatementSyntax.AddIdentifiers
;GenericForStatementSyntax.Identifiers
;GenericForStatementSyntax.Update
;GenericForStatementSyntax.WithIdentifiers
;NumericForStatementSyntax.Identifier
;NumericForStatementSyntax.Update
;NumericForStatementSyntax.WithIdentifier
;SyntaxFactory.GenericForStatement
;SyntaxFactory.NumericForStatement
;