docs: document string interpolation syntax and update code examples across docs and site

Add a new "Interpolation" section to the values documentation explaining the `%(expr)` syntax with examples of complex expressions and nested interpolation. Update all code samples in README.md, getting-started.markdown, and index.markdown to use the new interpolation syntax instead of string concatenation. Adjust syntax highlighting in style.scss by adding a new `.si` class for interpolation spans with distinct background color, and tweak existing color values for strings, numbers, and keywords to improve visual distinction. Add the `\%` escape sequence to the list of supported escape characters in values.markdown.
This commit is contained in:
Bob Nystrom
2015-11-21 17:20:50 +00:00
parent 920b3e2a32
commit fa1c1f5cda
5 changed files with 29 additions and 7 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ a familiar, modern [syntax][].
class Wren {
flyTo(city) {
System.print("Flying to " + city)
System.print("Flying to %(city)")
}
}