LoginLogin
Might make SBS readonly: thread

Syntax highlighter update

Root / Site Discussion / [.]

12Me21Created:
http://12Me21.github.io/sbhighlight/
  • Now highlights operators and user variables/functions.
  • Fixed a few bugs with E numbers.
  • Highlights textContent rather than innerHTML.
  • No longer highlights invalid constants
  • doesn't highlight @
  • No longer highlights - as part of a number (like the original SB editor)
  • TRUE and FALSE are highlighted as constants instead of keywords
  • TO and STEP are not highlighted as keywords (because they aren't) (like the original SB editor)
  • ? is highlighted like PRINT
  • OPTION, XOFF, XON, and CALL's special arguments are highlighted
  • Other symbols (, . [] () TO STEP ; : etc.) can now be highlighted (probably should be disabled by default)
  • User variables can now have [] suffix (for DEF arguments)
  • probably a few other things that I forgot

Oh I almost forgot highlighter updated again - Can now tell the difference between function calls and variables:
CLS 'function
CLS = 1 'variable
ABS = ABS(ABS)
- Now supports different modes: [code]default sb3/sb4 compatibility mode[/code] [code=sb3]sb3 mode[/code] [code=sb4]sb4 mode[/code] [code=none]no highlighting[/code]