Sha256: 7564f7d57b5c86820c840f2728c8d271e3b83fda802ee3fe06dac6508b794ca2

Contents?: true

Size: 1.54 KB

Versions: 18

Compression:

Stored size: 1.54 KB

Contents

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

/**
 * @fileoverview
 * Registers a language handler for (Turbo) Pascal.
 *
 * 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-pascal">(my Pascal 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 cStyleComments comment (* *) or {}
          [PR.PR_COMMENT,       /^\(\*[\s\S]*?(?:\*\)|$)|^\{[\s\S]*?(?:\}|$)/, null],
          [PR.PR_KEYWORD,       /^(?:ABSOLUTE|AND|ARRAY|ASM|ASSEMBLER|BEGIN|CASE|CONST|CONSTRUCTOR|DESTRUCTOR|DIV|DO|DOWNTO|ELSE|END|EXTERNAL|FOR|FORWARD|FUNCTION|GOTO|IF|IMPLEMENTATION|IN|INLINE|INTERFACE|INTERRUPT|LABEL|MOD|NOT|OBJECT|OF|OR|PACKED|PROCEDURE|PROGRAM|RECORD|REPEAT|SET|SHL|SHR|THEN|TO|TYPE|UNIT|UNTIL|USES|VAR|VIRTUAL|WHILE|WITH|XOR)\b/i, null],
          [PR.PR_LITERAL,       /^(?:true|false|self|nil)/i, null],
          [PR.PR_PLAIN,         /^[a-z][a-z0-9]*/i, null],
          // Literals .0, 0, 0.0 0E13
          [PR.PR_LITERAL,       /^(?:\$[a-f0-9]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?)/i,  null, '0123456789'],
          [PR.PR_PUNCTUATION,   /^.[^\s\w\.$@\'\/]*/, null]
        ]),
    ['pascal']);

Version data entries

18 entries across 18 versions & 4 rubygems

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