Sha256: 1f5ba58af28e9dc411739dd81b64bbc017c9a9b2a491f3d569e9bee1261cb2b6

Contents?: true

Size: 1000 Bytes

Versions: 10

Compression:

Stored size: 1000 Bytes

Contents

Prism.languages.erlang = {
	'comment': /%.+/,
	'string': /"(?:\\?.)*?"/,
	'quoted-function': {
		pattern: /'(?:\\.|[^'\\])+'(?=\()/,
		alias: 'function'
	},
	'quoted-atom': {
		pattern: /'(?:\\.|[^'\\])+'/,
		alias: 'atom'
	},
	'boolean': /\b(?:true|false)\b/,
	'keyword': /\b(?:fun|when|case|of|end|if|receive|after|try|catch)\b/,
	'number': [
		/\$\\?./,
		/\d+#[a-z0-9]+/i,
		/(?:\b|-)\d*\.?\d+([Ee][+-]?\d+)?\b/
	],
	'function': /\b[a-z][\w@]*(?=\()/,
	'variable': {
		// Look-behind is used to prevent wrong highlighting of atoms containing "@"
		pattern: /(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,
		lookbehind: true
	},
	'operator': [
		/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:bnot|div|rem|band|bor|bxor|bsl|bsr|not|and|or|xor|orelse|andalso)\b/,
		{
			// We don't want to match <<
			pattern: /(^|[^<])<(?!<)/,
			lookbehind: true
		},
		{
			// We don't want to match >>
			pattern: /(^|[^>])>(?!>)/,
			lookbehind: true
		}
	],
	'atom': /\b[a-z][\w@]*/,
	'punctuation': /[()[\]{}:;,.#|]|<<|>>/

};

Version data entries

10 entries across 10 versions & 2 rubygems

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