Sha256: 45021c2426918a802324714de866b7cbf3c092c98a3414c89ddb3c12a1c09b5a

Contents?: true

Size: 1.46 KB

Versions: 10

Compression:

Stored size: 1.46 KB

Contents

Prism.languages.glsl = Prism.languages.extend('clike', {
	'comment': [
		/\/\*[\w\W]*?\*\//,
		/\/\/(?:\\(?:\r\n|[\s\S])|.)*/
	],
	'number': /\b(?:0x[\da-f]+|(?:\.\d+|\d+\.?\d*)(?:e[+-]?\d+)?)[ulf]*\b/i,
	'keyword': /\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/
});

Prism.languages.insertBefore('glsl', 'comment', {
	'preprocessor': {
		pattern: /(^[ \t]*)#(?:(?:define|undef|if|ifdef|ifndef|else|elif|endif|error|pragma|extension|version|line)\b)?/m,
		lookbehind: true,
		alias: 'builtin'
	}
});

Version data entries

10 entries across 10 versions & 2 rubygems

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