lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

syntax_test_jsp.jsp (2205B)


      1 // SYNTAX TEST "Packages/Java/Java Server Pages (JSP).sublime-syntax"
      2 // <- text.html.jsp - source.java.embedded.html
      3 <!DOCTYPE html>
      4 <html>
      5 <head>
      6     <title></title>
      7 //  ^^^^^^^^^^^^^^^ meta.tag
      8 </head>
      9 <body>
     10     <%@ include file="foo.bar" %>
     11 //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.directive
     12 //  ^^^ punctuation.section.directive
     13 //                             ^^ punctuation.section.directive
     14 
     15     Plain text
     16 //  ^^^^^^^^^^ text.html.jsp - meta
     17 
     18     <%-- This is a comment --%>
     19 //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.block.jsp
     20     <%
     21 //  ^^ punctuation.section.embedded.begin.jsp - source.java.embedded.html
     22 //    ^ source.java.embedded.html
     23     if (!foo && !bar) {
     24 //  ^^ keyword.control.conditional.if.java
     25 //      ^ keyword.operator.logical.java
     26 //           ^^ keyword.operator.logical.java
     27     %><div style="width: 90%"></div><%
     28 //  ^^ punctuation.section.embedded.end.jsp - source.java.embedded.html
     29 //    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
     30 //                                  ^^ punctuation.section.embedded.begin.jsp - source.java.embedded.html
     31         if (foot.shouldBe()) {
     32 //      ^^ keyword.control.conditional.if.java
     33             boolean test = false;
     34 //          ^^^^^^^ storage.type
     35 //                         ^^^^^ constant
     36             %>
     37 //          ^^ punctuation.section.embedded.end.jsp - source.java.embedded.html
     38 //            ^ text.html.jsp - source.java.embedded.html
     39 
     40             <%-- This is a comment --%>
     41 //          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.block.jsp
     42             <% int aNumber = 0; // this scriptlet should close %>
     43 //                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash.java
     44 //                                                             ^^ punctuation.section.embedded.end.jsp
     45 
     46 
     47             <div style="width: 90%"></div>
     48 //          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
     49             <%
     50 //          ^^ punctuation.section.embedded.begin.jsp - source.java.embedded.html
     51         }
     52 //      ^ - invalid.illegal.stray-brace-end
     53     }
     54 //  ^ - invalid.illegal.stray-brace-end
     55     %>
     56 //  ^^ punctuation.section.embedded.end.jsp - source.java.embedded.html
     57 //    ^ text.html.jsp - source.java.embedded.html
     58 </body>
     59 </html>