Sha256: d52f2fe76b54da94181f2c2c0f6b01eaf98f5b2d1dfee146ac62059a4206a8a9

Contents?: true

Size: 891 Bytes

Versions: 10

Compression:

Stored size: 891 Bytes

Contents

Prism.languages.ocaml = {
	'comment': /\(\*[\s\S]*?\*\)/,
	'string': [
		/"(?:\\.|[^\\\r\n"])*"/,
		/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i
	],
	'number': /\b-?(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,
	'type': {
		pattern: /\B['`][a-z\d_]*/i,
		alias: 'variable'
	},
	'directive': {
		pattern: /\B#[a-z\d_]+/i,
		alias: 'function'
	},
	'keyword': /\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|prefix|private|rec|then|sig|struct|to|try|type|val|value|virtual|where|while|with)\b/,
	'boolean': /\b(?:false|true)\b/,
	// Custom operators are allowed
	'operator': /:=|[=<>@^|&+\-*\/$%!?~][!$%&\*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lxor|lsl|lsr|mod|nor|or)\b/,
	'punctuation': /[(){}\[\]|_.,:;]/
};

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
prism-rails-1.6.0.3 vendor/assets/javascripts/prism/prism-ocaml.js
prism-rails-1.6.0.2 vendor/assets/javascripts/prism/prism-ocaml.js
prism-rails-1.6.0.1 vendor/assets/javascripts/prism/prism-ocaml.js
prism-rails-1.5.1.2 vendor/assets/javascripts/prism-ocaml.js
prism-rails-1.5.1 vendor/assets/javascripts/prism-ocaml.js
highlighting-0.1.4 vendor/assets/javascripts/prism-ocaml.js
highlighting-0.1.3 vendor/assets/javascripts/prism-ocaml.js
highlighting-0.1.2 vendor/assets/javascripts/prism-ocaml.js
highlighting-0.1.1 vendor/assets/javascripts/prism-ocaml.js
highlighting-0.1.0 vendor/assets/javascripts/prism-ocaml.js