| OLD | NEW |
| 1 // Contributed by peter dot kofler at code minus cop dot org | 1 // Contributed by peter dot kofler at code minus cop dot org |
| 2 | 2 |
| 3 /** | 3 /** |
| 4 * @fileoverview | 4 * @fileoverview |
| 5 * Registers a language handler for Basic. | 5 * Registers a language handler for Basic. |
| 6 * | 6 * |
| 7 * To use, include prettify.js and this file in your HTML page. | 7 * To use, include prettify.js and this file in your HTML page. |
| 8 * Then put your code in an HTML tag like | 8 * Then put your code in an HTML tag like |
| 9 * <pre class="prettyprint lang-basic">(my BASIC code)</pre> | 9 * <pre class="prettyprint lang-basic">(my BASIC code)</pre> |
| 10 * | 10 * |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // A line comment that starts with REM | 23 // A line comment that starts with REM |
| 24 [PR.PR_COMMENT, /^REM[^\r\n]*/, null], | 24 [PR.PR_COMMENT, /^REM[^\r\n]*/, null], |
| 25 [PR.PR_KEYWORD, /^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|E
ND|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|
READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/, null], | 25 [PR.PR_KEYWORD, /^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|E
ND|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|
READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/, null], |
| 26 [PR.PR_PLAIN, /^[A-Z][A-Z0-9]?(?:\$|%)?/i, null], | 26 [PR.PR_PLAIN, /^[A-Z][A-Z0-9]?(?:\$|%)?/i, null], |
| 27 // Literals .0, 0, 0.0 0E13 | 27 // Literals .0, 0, 0.0 0E13 |
| 28 [PR.PR_LITERAL, /^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i, nul
l, '0123456789'], | 28 [PR.PR_LITERAL, /^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i, nul
l, '0123456789'], |
| 29 [PR.PR_PUNCTUATION, /^.[^\s\w\.$%"]*/, null] | 29 [PR.PR_PUNCTUATION, /^.[^\s\w\.$%"]*/, null] |
| 30 // [PR.PR_PUNCTUATION, /^[-,:;!<>=\+^\/\*]+/] | 30 // [PR.PR_PUNCTUATION, /^[-,:;!<>=\+^\/\*]+/] |
| 31 ]), | 31 ]), |
| 32 ['basic','cbm']); | 32 ['basic','cbm']); |
| OLD | NEW |