* Correct tagged template literal test.
Should use Coffeescript form of interpolated
strings, not Javascript!
* First pass at docs for tagged template literals.
* Correct alerted variable.
* Add note re checking runtime for tagged template literals
* Fixed broken example.
* Consistent style
* Clarify that CoffeeScript isn’t handling the tagged template literal, the runtime is; fix CoffeeScript spelling
* Collapse notes about generator functions and tagged template literals into the same sentence
* Make tagged template literals example into a function
* Make text less clunky.
* More clarity on what CoffeeScript is doing versus what the runtime is doing, and emphasize runtimes vs Babel/Traceur
* Remove moot `version` property from bower.json
Per bower/bower.json-spec@a325da3
* No need for bower to know about dev dependencies, and this is one less thing to keep in sync
* Documentation of `for...from` for iterating over generator functions
* Add note that the CoffeeScript compiler does not, in fact, generate JavaScript that runs in every JavaScript runtime 😢
* Docs shorthand object notation
A simple but slightly more imaginative example of shorthand object notation.
Closes#1808.
Signed-off-by: Daniel Bayley <daniel.bayley@me.com>
* Update for new documentation folder structure
* Fix typo
* The generated JavaScript for the examples in the docs ends up within index.html, so we don’t need the intermediate generated .js files committed in the repo; also, even while .gitignored they should be under `docs`, with the rest of the generated files, not under `documentation`, where the source files are.
* Add “Existential Operator” to the table of contents. Closes#4361
* Updated output due to newer version of highlight.js
* Generated the JavaScript for the docs examples should be synchronous, so that index.html isn’t generated before the JavaScript is
* In “Try CoffeeScript,” if you press the tab key it should type a tab character. Closes#3342.
* Rename doc example folders from `js` and `coffee` to just `examples`
* Add missing `yield` to the list of keywords to highlight until highlight.js catches up; update the class used to match highlight.js’ `keyword`
* `cake doc:site` should watch the example files too, not just index.html.js
* Remove examples folder, including underscore.coffee; remove link to annotated underscore.coffee
* Support JavaScript code blocks set apart by triple backticks (``` ... ```)
* Add test for escaped backticks
* Remove TODOs for things we’re never going to support
* Convert escaped backticks to backticks; update tests
* Block inline JavaScript can end with an escaped backtick character
* Updated JavaScript token regexes per @lydell
* In JavaScript blocks, escape backslashes when they immediately precede backticks; additional tests
* Test that we don’t break backslash escaping in JavaScript literals
* Add initial support for template literals with no
interpolation
* Change ‘unexpected string’ error message tests to
use number not identifier prefix.
Identifer prefixes are now valid as tagged
template literals
* Test tagged template literals for non-interpolated
strings and tag function.
* Tagged template literals work for pure Strings.
Pull tagged template definition up to Invocation
level in grammar, enabling chained invocation calls.
We can view a tagged template is a special form
of function call.
* Readying for StringWithInterpolations work.
* Tweaks.
* Fix style
* Pass StringWithInterpolations parameter straight
into Call constructor.
StringWithInterpolations will be output as
template literal, so already in correct form for
outputting tagged template literal.
* Strip down compileNode for StringWithInterpolations
* Done StringLiteral case for interpolated Strings
* Remove need for TemplateLiteral
* Simplify code.
* Small code tidy
* Interpolated strings now outputting as template literals.
Still needs comprehensive testing.
* Move error message tests into error_messages.coffee; remove test that is testing for a Node runtime error
* Split up tests that were testing multiple things per test, so that each test tests only one thing
* Edge cases: tagged template literals containing interpolated strings or even internal tagged template literals
* Make more concise, more idiomatic style
* Pull back extreme indentation
* Restore and fix commented-out tests
* Edge case: tagged template literal with empty string
* Only use new ES2015 interpolated string syntax if we’re inside a tagged template literal; this keeps this PR safe to merge into CoffeeScript 1.x. Remove the code from this commit to make all interpolated strings use ES2015 syntax, for CoffeeScript 2.
* Compiler now _doesn’t_ use template literals.
* Expand tagged template literal tests
* Move ‘Unexpected string’ error message tests into
tagged template literal section.
‘Unexpected string’ is not reported in these test
scenarios anymore. Instead, we error that the
prefixing literal is not a function.
* Don’t unwrap StringWithInterpolations.
Saw bug with program consisting of “#{2}” not
compiling with template literals. Root cause was
that Block.compileNode was unwrapping interpolated
string and so didn’t use compileNode logic at
StringWithInterpolations level.
* No need to bracket interpolated strings any more.
When interpolated string looks like `hello ${2}`,
no extract brackets are needed, as the `s mark the
beginning and end.
* Show html templating with tagged template literals
* Multiline should match multiline
* Comment out unnecessary `unwrap`, which is only needed for CoffeeScript 2 all-ES2015 syntax output