lectures.alex.balgavy.eu

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

HTML-ASP.sublime-syntax (1582B)


      1 %YAML 1.2
      2 ---
      3 # http://www.sublimetext.com/docs/3/syntax.html
      4 name: HTML (ASP)
      5 file_extensions:
      6   - asp
      7 scope: text.html.asp
      8 contexts:
      9   main:
     10     - include: html
     11 
     12   asp_punctuation_begin:
     13     - match: '<%'
     14       scope: punctuation.section.embedded.begin.asp
     15       push:
     16         - match: '@' # https://msdn.microsoft.com/en-us/library/ms525579%28v=vs.90%29.aspx
     17           set: asp_directive
     18         - match: '='
     19           scope: punctuation.section.embedded.begin.asp
     20           set: [close_embedded_asp, begin_embedded_asp_expression]
     21         - match: '(?=\S)'
     22           set: [close_embedded_asp, begin_embedded_asp]
     23 
     24   asp_directive:
     25     - match: '@?\s*\b((?i:ENABLESESSIONSTATE|LANGUAGE|LCID|TRANSACTION))\b'
     26       captures:
     27         1: constant.language.processing-directive.asp
     28       push:
     29         - match: '\s*(=)\s*'
     30           scope: punctuation.separator.key-value.asp
     31           pop: true
     32         - match: '(?=%>)'
     33           pop: true
     34     - match: '%>'
     35       scope: punctuation.section.embedded.end.asp
     36       pop: true
     37 
     38   html:
     39     - match: ''
     40       set:
     41         - include: scope:text.html.basic
     42       with_prototype:
     43         - include: asp_punctuation_begin
     44 
     45   begin_embedded_asp:
     46     - meta_content_scope: source.asp.embedded.html
     47     - match: '(?=%>)'
     48       pop: true
     49     - include: scope:source.asp
     50 
     51   begin_embedded_asp_expression:
     52     - meta_content_scope: source.asp.embedded.html
     53     - match: '(?=%>)'
     54       pop: true
     55     - include: scope:source.asp#expression
     56 
     57   close_embedded_asp:
     58     - match: '%>'
     59       scope: punctuation.section.embedded.end.asp
     60       pop: true