Skip to content

v2.3.0

Compare
Choose a tag to compare
@github-actions github-actions released this 06 Mar 05:22

This is the compiler for Yarn Spinner. If you want to use Yarn Spinner in a Unity game, please see the releases page for Yarn Spinner for Unity!

Yarn Spinner is made possible by your generous patronage. Please consider supporting Yarn Spinner's development by becoming a patron!

Added

  • Yarn Programs now store all headers for their nodes.
    • Prior to this change, only the tags header was stored.

Changed

  • The Yarn Spinner compiler's indentation tracking has been rewritten to be more consistent in how it works.

    • 🚨 Breaking Change: if statements must now all be at the same level of indentation as their corresponding else, elseif, and endif statements.
      • This was already strongly encouraged for readability, but is now a requirement.

      • If an if statement is at a different indentation level to its corresponding statements, a compiler error will now be generated.

      • The lines and other content inside an if statement can be indented as much as you like, as long as it's not less indented than the initial if statement.

        For example, the following code will work:

        // With indentation
        <<if $something>>
            A line!
        <<else>>
            A different line!
        <<endif>>
        
        // Without indentation
        <<if $something>>
        A line!
        <<else>>
        A different line!
        <<endif>>
        

        The following code will not work:

        // With indentation
        <<if $something>>
          A line!
          <<else>>
        A different line!
        <<endif>>
        
    • 🚨 Breaking Change: Empty lines between options now split up different option groups.
      • Previously, the following code would appear as a single option group (with the options 'A', 'B', 'C', 'D'):

        -> A
        -> B
        
        -> C
        -> D
        

        In Yarn Spinner 2.3 and above, this will appear as two option groups: one containing the options 'A', 'B', and another containing 'C', 'D'.

        This change was made in response to user reports that the previous behaviour didn't behave the way they expected.

  • Node title verification now occurs at declaration time instead of code generation. This means invalid titles will be caught and presented as a problem earlier on, to aid in debugging issues.

  • Code completion in the Language Server has been completely rewritten. It is now much less flexible, but way more performant. For most situations, the changes will not be noticeable.

  • Fixed a crash in the Language Server when encountering declaration statements without a variable.