Skip to content

v0.2.13

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 31 Mar 00:51
· 24 commits to main since this release
4dc49a4

Added

  • Implemented support for Luau interpolated strings by @GGG-KILLER in #138.
    • New diagnostics:
      • LUA0033: Interpolated strings must start with the backtick character: `.
      • LUA0034: Interpolated strings expressions must have a corresponding closing '}' for every opening '{'.
      • LUA0035: Double braces have no meaning, did you mean to escape an opening brace with '\{'?
      • LUA0036: Interpolated strings are not supported in this lua version.
    • New nodes:
      • InterpolatedStringContentSyntax: base node for the parts of the interpolated strings.
      • InterpolatedStringTextSyntax: Plain text part of the interpolated strings.
      • InterpolationSyntax: the expression "holes" that will be interpolated into the string.
      • InterpolatedStringExpressionSyntax: The expression mode for interpolated strings that contains the quotes and parts of the interpolated string.
  • Added the BacktickStringType setting to LuaSyntaxOptions to switch between interpolated strings, hash strings and neither by @GGG-KILLER in #138.
  • Added new node FunctionTypeParameterSyntax that represents a parameter to a function type/signature by @GGG-KILLER in #145.

Changed

  • Identifier tokens now never have a ContextualKind by @GGG-KILLER in #134.
  • [Breaking] LuaSyntaxOptions.Luau has been modified to enable floor division by @GGG-KILLER in #133.
  • [Breaking] Fixed the way invalid statement diagnostics are generated by changing them to be generated on the skipped token instead of on the full missing identifier node by @GGG-KILLER in #135.
  • [Breaking] LuaSyntaxOptions.All now accepts interpolated strings instead of hash strings by @GGG-KILLER in #138.
  • [Breaking] FunctionTypeSyntax.Parameters (and associated method parameters) have been switched from a SeparatedSyntaxList<TypeSyntax> into a SeparatedSyntaxList<FunctionTypeParameterSyntax> by @GGG-KILLER in #145.
  • [Breaking] SyntaxFactory.FunctionType now accepts a SeparatedSyntaxList<FunctionTypeParameterSyntax> instead of a SeparatedSyntaxList<TypeSyntax> by @GGG-KILLER in #145.
  • [Breaking] Strings end at unescaped line break instead of generating warnings and continuing until the next quote or EOF @GGG-KILLER in #146.

Deprecated

  • Deprecated LuaSyntaxOptions.AcceptHashStrings in favor of LuaSyntaxOptions.BacktickStringType by @GGG-KILLER in #138.

Removed

  • acceptHashStrings has been removed from LuaSyntaxOptions constructor and .With in favor of backtickStringType by @GGG-KILLER in #138.
  • Diagnostic LUA0029 (Hash strings are not supported in this lua version) has been removed (and replaced with LUA0036) by @GGG-KILLER in #138.
  • Diagnostic LUA0002 (Unescaped line break in string) has been removed by @GGG-KILLER in #146.

Fixed

  • Fixed continue still being parsed as a keyword even when ContinueType was ContinueType.None by @GGG-KILLER in #134;
  • Fixed goto and ::label:: still being parsed when AcceptGoto was false by @GGG-KILLER in #134.
  • Fixed type not being interpreted as a contextual keyword by @GGG-KILLER in #144.