mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
.frag file extension added for JavaScript with some new samples
This commit is contained in:
@@ -1059,6 +1059,7 @@ JavaScript:
|
|||||||
- ._js
|
- ._js
|
||||||
- .bones
|
- .bones
|
||||||
- .es6
|
- .es6
|
||||||
|
- .frag
|
||||||
- .jake
|
- .jake
|
||||||
- .jsfl
|
- .jsfl
|
||||||
- .jsm
|
- .jsm
|
||||||
|
|||||||
118883
lib/linguist/samples.json
118883
lib/linguist/samples.json
File diff suppressed because it is too large
Load Diff
9
samples/GLSL/SimpleLighting.gl2.frag
Normal file
9
samples/GLSL/SimpleLighting.gl2.frag
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
static const char* SimpleFragmentShader = STRINGIFY(
|
||||||
|
|
||||||
|
varying vec4 FrontColor;
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
gl_FragColor = FrontColor;
|
||||||
|
}
|
||||||
|
);
|
||||||
48
samples/GLSL/recurse1.frag
Normal file
48
samples/GLSL/recurse1.frag
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
#version 330 core
|
||||||
|
|
||||||
|
// cross-unit recursion
|
||||||
|
|
||||||
|
void main() {}
|
||||||
|
|
||||||
|
// two-level recursion
|
||||||
|
|
||||||
|
float cbar(int);
|
||||||
|
|
||||||
|
void cfoo(float)
|
||||||
|
{
|
||||||
|
cbar(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// four-level, out of order
|
||||||
|
|
||||||
|
void CB();
|
||||||
|
void CD();
|
||||||
|
void CA() { CB(); }
|
||||||
|
void CC() { CD(); }
|
||||||
|
|
||||||
|
// high degree
|
||||||
|
|
||||||
|
void CBT();
|
||||||
|
void CDT();
|
||||||
|
void CAT() { CBT(); CBT(); CBT(); }
|
||||||
|
void CCT() { CDT(); CDT(); CBT(); }
|
||||||
|
|
||||||
|
// not recursive
|
||||||
|
|
||||||
|
void norA() {}
|
||||||
|
void norB() { norA(); }
|
||||||
|
void norC() { norA(); }
|
||||||
|
void norD() { norA(); }
|
||||||
|
void norE() { norB(); }
|
||||||
|
void norF() { norB(); }
|
||||||
|
void norG() { norE(); }
|
||||||
|
void norH() { norE(); }
|
||||||
|
void norI() { norE(); }
|
||||||
|
|
||||||
|
// not recursive, but with a call leading into a cycle if ignoring direction
|
||||||
|
|
||||||
|
void norcA() { }
|
||||||
|
void norcB() { norcA(); }
|
||||||
|
void norcC() { norcB(); }
|
||||||
|
void norcD() { norcC(); norcB(); } // head of cycle
|
||||||
|
void norcE() { norcD(); } // lead into cycle
|
||||||
7
samples/JavaScript/intro.js.frag
Normal file
7
samples/JavaScript/intro.js.frag
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
(function(window, angular) {
|
||||||
|
|
||||||
|
Array.prototype.last = function() {
|
||||||
|
return this[this.length-1];
|
||||||
|
};
|
||||||
|
|
||||||
|
var app = angular.module('ConwayGameOfLife', []);
|
||||||
3
samples/JavaScript/outro.js.frag
Normal file
3
samples/JavaScript/outro.js.frag
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
})(window, window.angular);
|
||||||
|
|
||||||
Reference in New Issue
Block a user