]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/basic.js
1 /*! `basic` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
8 Author: Raphaël Assénat <raph@raphnet.net>
9 Description: Based on the BASIC reference from the Tandy 1000 guide
10 Website: https://en.wikipedia.org/wiki/Tandy_1000
14 /** @type LanguageFn */
15 function basic(hljs
) {
198 case_insensitive: true,
200 // Support explicitly typed variables that end with $%! or #.
202 $pattern: '[a-zA-Z][a-zA-Z0-9_$%!#]*',
207 // Match strings that start with " and end with " or a line break
211 contains: [ hljs
.BACKSLASH_ESCAPE
]
213 hljs
.COMMENT('REM', '$', { relevance: 10 }),
214 hljs
.COMMENT('\'', '$', { relevance: 0 }),
216 // Match line numbers
222 // Match typed numeric constants (1000, 12.34!, 1.2e5, 1.5#, 1.2D2)
224 begin: '\\b\\d+(\\.\\d+)?([edED]\\d+)?[#\!]?',
228 // Match hexadecimal numbers (&Hxxxx)
230 begin: '(&[hH][0-9a-fA-F]{1,4})'
233 // Match octal numbers (&Oxxxxxx)
235 begin: '(&[oO][0-7]{1,6})'
245 hljs
.registerLanguage('basic', hljsGrammar
);