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

typescript.lua (477B)


  1. -- Copyright 2021-2024 Mitchell. See LICENSE.
  2. -- TypeScript LPeg lexer.
  3. local lexer = lexer
  4. local P, S = lpeg.P, lpeg.S
  5. local lex = lexer.new(..., {inherit = lexer.load('javascript')})
  6. -- Word lists.
  7. lex:set_word_list(lexer.KEYWORD, 'abstract as constructor declare is module namespace require type',
  8. true)
  9. lex:set_word_list(lexer.TYPE, 'boolean number bigint string unknown any void never symbol object',
  10. true)
  11. lexer.property['scintillua.comment'] = '//'
  12. return lex