logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

jsp.lua (536B)


  1. -- Copyright 2006-2024 Mitchell. See LICENSE.
  2. -- JSP LPeg lexer.
  3. local lexer = lexer
  4. local P, S = lpeg.P, lpeg.S
  5. local lex = lexer.new(..., {inherit = lexer.load('html')})
  6. -- Embedded Java.
  7. local java = lexer.load('java')
  8. local java_start_rule = lex:tag(lexer.PREPROCESSOR, '<%' * P('=')^-1)
  9. local java_end_rule = lex:tag(lexer.PREPROCESSOR, '%>')
  10. lex:embed(java, java_start_rule, java_end_rule, true)
  11. -- Fold points.
  12. lex:add_fold_point(lexer.PREPROCESSOR, '<%', '%>')
  13. lexer.property['scintillua.comment'] = '<!--|-->'
  14. return lex