Sha256: 4d3f0a229f308a603495bf1f9f41cf8f3f07b1e70cb30203a3242e8485fbcae3

Contents?: true

Size: 1.36 KB

Versions: 18

Compression:

Stored size: 1.36 KB

Contents

// Contributed by peter dot kofler at code minus cop dot org

/**
 * @fileoverview
 * Registers a language handler for Basic.
 *
 * To use, include prettify.js and this file in your HTML page.
 * Then put your code in an HTML tag like
 *      <pre class="prettyprint lang-basic">(my BASIC code)</pre>
 *
 * @author peter dot kofler at code minus cop dot org
 */

PR.registerLangHandler(
    PR.createSimpleLexer(
        [ // shortcutStylePatterns
          // "single-line-string"
          [PR.PR_STRING,        /^(?:"(?:[^\\"\r\n]|\\.)*(?:"|$))/, null, '"'],
          // Whitespace
          [PR.PR_PLAIN,         /^\s+/, null, ' \r\n\t\xA0']
        ],
        [ // fallthroughStylePatterns
          // A line comment that starts with REM
          [PR.PR_COMMENT,       /^REM[^\r\n]*/, null],
          [PR.PR_KEYWORD,       /^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|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],
          [PR.PR_PLAIN,         /^[A-Z][A-Z0-9]?(?:\$|%)?/i, null],
          // Literals .0, 0, 0.0 0E13
          [PR.PR_LITERAL,       /^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i,  null, '0123456789'],
          [PR.PR_PUNCTUATION,   /^.[^\s\w\.$%"]*/, null]
          // [PR.PR_PUNCTUATION,   /^[-,:;!<>=\+^\/\*]+/]
        ]),
    ['basic','cbm']);

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
gentelella-rails-0.1.11 assets/javascripts/prettify/lang-basic.js
gentelella-rails-0.1.10 assets/javascripts/prettify/lang-basic.js
gentelella-rails-0.1.8 assets/javascripts/prettify/lang-basic.js
gentelella-rails-0.1.7 assets/javascripts/prettify/lang-basic.js
gentelella-rails-0.1.6 assets/javascripts/prettify/lang-basic.js
gentelella-rails-0.1.5 assets/javascripts/prettify/lang-basic.js
gentelella-rails-0.1.4 assets/javascripts/prettify/lang-basic.js
gentelella-rails-0.1.3 assets/javascripts/prettify/lang-basic.js
gentelella-rails-0.1.2 assets/javascripts/prettify/lang-basic.js
gentelella-rails-0.1.1 assets/javascripts/prettify/lang-basic.js
gentelella-rails-0.1.0 assets/javascripts/prettify/lang-basic.js
plate-lang-0.1.2 skeleton/vendor/google-code-prettify/src/lang-basic.js
plate-lang-0.1.1 skeleton/vendor/google-code-prettify/src/lang-basic.js
plate-lang-0.1.0 skeleton/vendor/google-code-prettify/src/lang-basic.js
patternfly-sass-1.2.0 tests/components/google-code-prettify/src/lang-basic.js
polymer-core-rails-0.2.6 app/assets/components/google-code-prettify/src/lang-basic.js
polymer-core-rails-0.2.5 app/assets/components/google-code-prettify/src/lang-basic.js
polymer-core-rails-0.2.0 app/assets/components/google-code-prettify/src/lang-basic.js