Skip to content

Commit 53621d7

Browse files
committed
Include language version in compiled output
1 parent e1fe4d3 commit 53621d7

File tree

4 files changed

+414
-136
lines changed

4 files changed

+414
-136
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2727
- To indicate that your game did not select an option and that the game should continue anyway, your code should call `SetSelectedOption` with the special `Dialogue.NoOptionSelected` value.
2828
- Added a `ReplacementMarkerResult` struct that encapsulates diagnostics of replacement markup processors, and also an invisible characters count.
2929
- This allows for replacement markup to declare how many invisible characters they have added.
30-
- This is necessary because both Unity and Godot (and likely every tool out there) has some variant of rich text strings, where the attributes on the rich text is within the string itself. When markup processing modifies the string (such as by the `select` or `plural` markers, any sibling markup following the replacement needs to not be pushed down by the invisible elements of the string.
30+
- This is necessary because both Unity and Godot (and likely every tool out there) has some variant of rich text strings, where the attributes on the rich text is within the string itself. When markup processing modifies the string (such as by the `select` or `plural` markers, any sibling markup following the replacement needs to not be pushed down by the invisible elements of the string.)
3131
- Fixed an issue where variables declared with negative numbers as their initial value would become smart variables ([#421](https://github.com/YarnSpinnerTool/YarnSpinner/issues/421))
32+
- Compiled Yarn Spinner `Program` objects now contain the `LanguageVersion` they were compiled against, to help with backward compatibility.
3233
3334
### Updated
3435

YarnSpinner.Compiler/Compiler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ public static CompilationResult Compile(CompilationJob compilationJob)
633633
}
634634

635635
var program = new Program();
636+
program.LanguageVersion = compilationJob.LanguageVersion;
636637
program.Nodes.Add(compiledNodes.Where(n => n.Name != null).ToDictionary(n => n.Name, n => n));
637638
program.InitialValues.Add(initialValues);
638639

0 commit comments

Comments
 (0)