OLD | NEW |
(Empty) | |
| 1 `foo bar` |
| 2 `foo |
| 3 bar` |
| 4 `40+2=${40+2}` |
| 5 `${foo()}` |
| 6 |
| 7 ---------------------------------------------------- |
| 8 |
| 9 [ |
| 10 ["template-string", [ |
| 11 ["string", "`foo bar`"] |
| 12 ]], |
| 13 ["template-string", [ |
| 14 ["string", "`foo\r\nbar`"] |
| 15 ]], |
| 16 ["template-string", [ |
| 17 ["string", "`40+2="], |
| 18 ["interpolation", [ |
| 19 ["interpolation-punctuation", "${"], |
| 20 ["number", "40"], |
| 21 ["operator", "+"], |
| 22 ["number", "2"], |
| 23 ["interpolation-punctuation", "}"] |
| 24 ]], |
| 25 ["string", "`"] |
| 26 ]], |
| 27 ["template-string", [ |
| 28 ["string", "`"], |
| 29 ["interpolation", [ |
| 30 ["interpolation-punctuation", "${"], |
| 31 ["function", "foo"], |
| 32 ["punctuation", "("], |
| 33 ["punctuation", ")"], |
| 34 ["interpolation-punctuation", "}"] |
| 35 ]], |
| 36 ["string", "`"] |
| 37 ]] |
| 38 ] |
| 39 |
| 40 ---------------------------------------------------- |
| 41 |
| 42 Checks for single-line and multi-line template strings. |
OLD | NEW |