OLD | NEW |
(Empty) | |
| 1 script. |
| 2 alert(42); |
| 3 |
| 4 . |
| 5 script(type='text/javascript'). |
| 6 |
| 7 if(foo) { |
| 8 bar(1 + 5); |
| 9 } |
| 10 |
| 11 ---------------------------------------------------- |
| 12 |
| 13 [ |
| 14 ["tag", [ |
| 15 "script" |
| 16 ]], |
| 17 ["punctuation", "."], |
| 18 ["multiline-script", [ |
| 19 ["function", "alert"], |
| 20 ["punctuation", "("], |
| 21 ["number", "42"], |
| 22 ["punctuation", ")"], |
| 23 ["punctuation", ";"] |
| 24 ]], |
| 25 |
| 26 ["punctuation", "."], |
| 27 |
| 28 ["tag", [ |
| 29 "script", |
| 30 ["attributes", [ |
| 31 ["punctuation", "("], |
| 32 ["attr-name", "type"], |
| 33 ["punctuation", "="], |
| 34 ["attr-value", [["string", "'text/javascript'"]]], |
| 35 ["punctuation", ")"] |
| 36 ]] |
| 37 ]], |
| 38 ["punctuation", "."], |
| 39 ["multiline-script", [ |
| 40 ["keyword", "if"], |
| 41 ["punctuation", "("], |
| 42 "foo", |
| 43 ["punctuation", ")"], |
| 44 ["punctuation", "{"], |
| 45 ["function", "bar"], |
| 46 ["punctuation", "("], |
| 47 ["number", "1"], |
| 48 ["operator", "+"], |
| 49 ["number", "5"], |
| 50 ["punctuation", ")"], |
| 51 ["punctuation", ";"], |
| 52 ["punctuation", "}"] |
| 53 ]] |
| 54 ] |
| 55 |
| 56 ---------------------------------------------------- |
| 57 |
| 58 Checks for multi-line scripts. The alone dot serves as a separator. |
OLD | NEW |