[] = [];
17 |
18 | let initFiles = ['/file.ts'];
19 |
20 | let start = performance.now();
21 |
22 | for (let [path, contents] of Object.entries(files.ts)) {
23 | let p = '/_std/' + path + '.ts';
24 | if (path == 'std') p = '/std.ts'; // So we can import it via import ui from "std";
25 |
26 | writes.push(env.writeFileTypescript(p, contents));
27 | initFiles.push(p);
28 | }
29 |
30 | for (let [path, contents] of Object.entries(files.shadeup)) {
31 | let p = '/_std/' + path + '.ts';
32 | writes.push(env.writeFile(p, contents, true));
33 | initFiles.push(p);
34 | }
35 |
36 | return env;
37 | }
38 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/engine-headless.ts:
--------------------------------------------------------------------------------
1 | import type { ShadeupRenderedFile } from '../compiler/common';
2 | import { globalDefine, globalRequire } from './amd';
3 | import { initInput, type MouseState } from './input/input';
4 | import { keyboardKeys } from './input/keyboardKeys';
5 | import { ShadeupShaderInstance, ShadeupShaderSource } from './shader';
6 | import { initUI } from './ui/ui';
7 | import { parse_type, stringify_type, translateIdentifier, translateNumericToGLSL } from './util';
8 |
9 | window.addEventListener('message', async function (e: MessageEvent) {
10 | var mainWindow = e.source;
11 | if (mainWindow == null) return;
12 |
13 | var result = '';
14 | if (e.data.type == 'frame') {
15 | try {
16 | let files: ShadeupRenderedFile[] = e.data.files;
17 | console.log(e.data);
18 |
19 | for (let file of files) {
20 | console.log(file);
21 | (() => {
22 | let define = (deps: string[], func: Function) => {
23 | globalDefine(file.path, deps, func);
24 | };
25 | define;
26 | try {
27 | const postMessage = (v: any) => mainWindow.postMessage(v, e.origin);
28 | eval(file.contents);
29 | } catch (e) {
30 | console.log(e);
31 | result = e.message;
32 | }
33 | })();
34 | }
35 | try {
36 | let outs = globalRequire(['/main.js'])[0];
37 |
38 | if (typeof outs.main === 'function') {
39 | let result = await outs.main();
40 | mainWindow.postMessage({ gid: (window as any)['LONG_GID'], data: result }, e.origin);
41 | } else {
42 | result = 'main is not a function';
43 | }
44 | } catch (e) {
45 | console.log(e);
46 | result = e.message;
47 | }
48 | } catch (e) {
49 | console.error(e);
50 | result = 'eval() threw an exception.';
51 | }
52 | mainWindow.postMessage(result, e.origin);
53 | }
54 | });
55 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/frame-embed.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Shadeup engine
5 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/frame-headless.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Shadeup engine (headless)
5 |
6 |
7 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/frame-preview.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Shadeup engine
5 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/setZero.ts:
--------------------------------------------------------------------------------
1 | // Only add setZeroTimeout to the window object, and hide everything
2 | // else in a closure.
3 | (function () {
4 | var timeouts = [];
5 | var messageName = 'zero-timeout-message';
6 |
7 | // Like setTimeout, but only takes a function argument. There's
8 | // no time argument (always zero) and no arguments (you have to
9 | // use a closure).
10 | function setZeroTimeout(fn) {
11 | timeouts.push(fn);
12 | window.postMessage(messageName, '*');
13 | }
14 |
15 | function handleMessage(event) {
16 | if (event.source == window && event.data == messageName) {
17 | event.stopPropagation();
18 | if (timeouts.length > 0) {
19 | var fn = timeouts.shift();
20 | fn();
21 | }
22 | }
23 | }
24 |
25 | window.addEventListener('message', handleMessage, true);
26 |
27 | // Add the one thing we want added to the window object.
28 | window.setZeroTimeout = setZeroTimeout;
29 | })();
30 |
31 | export {};
32 | declare global {
33 | interface Window {
34 | setZeroTimeout(fn: () => void): void;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/ui/components/Button.svelte:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
15 |
16 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/ui/components/Checkbox.svelte:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
18 |
{
24 | setValue(e.target.checked);
25 | value = e.target.checked;
26 | }}
27 | />
28 |
29 |
30 |
35 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/ui/components/Combo.svelte:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
21 |
22 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/ui/components/Group.svelte:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
40 |
41 |
45 |
46 | {#each children as child, i}
47 |
51 |
58 |
59 | {/each}
60 |
61 |
62 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/ui/components/Host.svelte:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 | {#each children as child}
12 |
19 | {/each}
20 |
21 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/ui/components/Label.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 | {value}
6 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/ui/components/Slider.svelte:
--------------------------------------------------------------------------------
1 |
23 |
24 | (dragging = false)} on:mousemove={handleMove} />
25 |
26 |
27 |
{
30 | dragging = true;
31 | handleMove(event);
32 | }}
33 | class="track w-full h-4 relative flex items-center"
34 | >
35 |
36 |
40 |
41 |
{
49 | setValue(parseFloat(e.target.value));
50 | value = parseFloat(e.target.value);
51 | }}
52 | />
53 |
{
60 | setValue(parseFloat(e.target.value));
61 | value = parseFloat(e.target.value);
62 | }}
63 | />
64 |
65 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/ui/components/Text.svelte:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | {
12 | setValue(e.target.value);
13 | value = e.target.value;
14 | }}
15 | />
16 |
17 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/ui/components/host.scss:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | @layer base {
6 | html {
7 | @apply text-white;
8 | }
9 | }
10 |
11 | .floating-panel {
12 | > .control-button:first-child,
13 | > .control-combo:first-child,
14 | > .control-input:first-child,
15 | > .control-label:first-child,
16 | > .control-select:first-child,
17 | > .control-text:first-child {
18 | @apply mt-2;
19 | }
20 |
21 | > .control-button:last-child,
22 | > .control-combo:last-child,
23 | > .control-input:last-child,
24 | > .control-label:last-child,
25 | > .control-select:last-child,
26 | > .control-text:last-child {
27 | @apply mb-1;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lang/shadeup/engine/ui/ui.ts:
--------------------------------------------------------------------------------
1 | import { initPuck } from './puck';
2 | import Host from './components/Host.svelte';
3 |
4 | export function initUI(canvas: HTMLCanvasElement) {
5 | let { frame, puck, preFrame, slider, controls } = initPuck(canvas);
6 |
7 | return {
8 | frame() {
9 | frame();
10 | },
11 | preFrame() {
12 | preFrame();
13 | },
14 | puck,
15 | slider,
16 | controls: controls
17 | // controls: host
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/lang/shadeup/frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Shadeup sandbox
5 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/lang/shadeup/library/drawAttributes.ts:
--------------------------------------------------------------------------------
1 | import { buffer } from '/_std/buffer';
2 | import { float4, float3, float, float2, bool, int, uint } from '/std_math';
3 |
4 | export function drawAttributes(
5 | indexBuffer: buffer,
6 | buffers:
7 | | Map>
8 | | {
9 | [key in keyof T]: buffer;
10 | },
11 | vertexShader: shader,
12 | pixelShader: shader
13 | ) {
14 | __shadeup_dispatch_draw_attributes(indexBuffer, buffer, vertexShader, pixelShader);
15 | }
16 |
--------------------------------------------------------------------------------
/lang/shadeup/library/drawCount.ts:
--------------------------------------------------------------------------------
1 | import { buffer } from '/_std/buffer';
2 | import { float4, float3, float, float2, bool, int, uint } from '/std_math';
3 |
4 | export function drawCount(triCount: number, vertexShader: shader, pixelShader: shader) {
5 | __shadeup_dispatch_draw_count(triCount, vertexShader, pixelShader);
6 | }
7 |
--------------------------------------------------------------------------------
/lang/shadeup/library/files.ts:
--------------------------------------------------------------------------------
1 | import std from './std.ts?raw';
2 | import ui from './ui.ts?raw';
3 | import native from './native.ts?raw';
4 | import buffer from './buffer.ts?raw';
5 | import texture from './texture.ts?raw';
6 | import physics from './physics.ts?raw';
7 | import drawIndexed from './drawIndexed.ts?raw';
8 | import drawCount from './drawCount.ts?raw';
9 | import drawAttributes from './drawAttributes.ts?raw';
10 | import paint from './paint.ts?raw';
11 | import mesh from './mesh.shadeup?raw';
12 | import geo from './geo.shadeup?raw';
13 | import textures from './textures.shadeup?raw';
14 | import common from './common.shadeup?raw';
15 | import sdf from './sdf.shadeup?raw';
16 |
17 | export default {
18 | shadeup: {
19 | mesh,
20 | textures,
21 | common,
22 | sdf,
23 | geo
24 | },
25 | ts: {
26 | std,
27 | ui,
28 | native,
29 | paint,
30 | buffer,
31 | texture,
32 | drawIndexed,
33 | drawAttributes,
34 | drawCount,
35 | physics
36 | }
37 | };
38 |
--------------------------------------------------------------------------------
/lang/shadeup/library/geo.shadeup:
--------------------------------------------------------------------------------
1 | struct GeoSegment {
2 | start: float2,
3 | end: float2,
4 | kind: int,
5 | arcRadius: float,
6 | arcStart: float,
7 | arcEnd: float
8 | }
9 |
10 | struct GeoPoly {
11 | segments: GeoSegment[]
12 | }
13 |
14 | trait Geometry {
15 | fn area(self) -> float;
16 | fn perimeter(self) -> float;
17 | fn discretize(self) -> GeoPoly;
18 | }
19 |
20 | impl Geometry for GeoPoly {
21 | pub fn area(self) -> float {
22 | return 0.0;
23 | }
24 |
25 | pub fn perimeter(self) -> float {
26 | return 0.0;
27 | }
28 |
29 | pub fn discretize(self) -> GeoPoly {
30 | return self.clone();
31 | }
32 | }
--------------------------------------------------------------------------------
/lang/shadeup/library/mesh.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AskingQuestions/Shadeup/8b25bf92c1aab62a48b6bc838f23dc33fb0a2285/lang/shadeup/library/mesh.ts
--------------------------------------------------------------------------------
/lang/shadeup/library/std.ts:
--------------------------------------------------------------------------------
1 | export { ui } from '/_std/ui';
2 | export { mesh, Mesh } from '/_std/mesh';
3 | export { sdf } from '/_std/sdf';
4 | export { geo } from '/_std/geo';
5 | export * from '/_std/native';
6 |
--------------------------------------------------------------------------------
/lang/shadeup/library/test.shadeup:
--------------------------------------------------------------------------------
1 |
2 | // Option 1
3 | let idx = buffer::new();
4 | let buf = buffer::new();
5 | let otherBuf = buffer::new();
6 |
7 | drawIndexed(idx, shader {
8 | let pos = buf[in.index].xyz;
9 | out.position = pos;
10 | out.custom("test", pos.x);
11 | }, shader {
12 | let px = in.custom("test");
13 | let c = otherBuf[round(px)];
14 | out.color = c.xyzw;
15 | });
16 |
17 | // Option 2
18 | let idx = buffer::new();
19 | let buf = buffer::new();
20 | let otherBuf = buffer::new();
21 |
22 | drawIndexed(idx, shader -> ({test: float}) {
23 | let pos = buf[in.index].xyz;
24 | out.position = pos;
25 | out.test = pos.x;
26 | }, shader <- ({test: float}) {
27 | let px = in.test;
28 | let c = otherBuf[round(px)];
29 | out.color = c.xyzw;
30 | });
31 |
32 | // Option 3
33 |
34 | let idx = buffer::new();
35 | let buf = buffer::new();
36 | let otherBuf = buffer::new();
37 |
38 | drawIndexed(idx, shader<{}, {test: float}> {
39 | let pos = buf[in.index].xyz;
40 | out.position = pos;
41 | out.test = pos.x;
42 | }, shader<{test: float}, {}> {
43 | let px = in.test;
44 | let c = otherBuf[round(px)];
45 | out.color = c.xyzw;
46 | });
--------------------------------------------------------------------------------
/lang/shadeup/library/textures.shadeup:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AskingQuestions/Shadeup/8b25bf92c1aab62a48b6bc838f23dc33fb0a2285/lang/shadeup/library/textures.shadeup
--------------------------------------------------------------------------------
/lang/shadeup/library/types.ts:
--------------------------------------------------------------------------------
1 | export type bool = boolean;
2 | export type float = number & { _opaque_float: 2 };
3 | export type int = number & { _opaque_int: 1 } & float;
4 | export type uint = number & { _opaque_uint: 1 } & float & int;
5 | type scalar = float | int;
6 |
7 | export type float2 = [float, float];
8 | export type float3 = [float, float, float];
9 | export type float4 = [float, float, float, float];
10 | export type int2 = [int, int];
11 | export type int3 = [int, int, int];
12 | export type int4 = [int, int, int, int];
13 |
14 | type anyFloat = float2 | float3 | float4;
15 | type anyInt = int2 | int3 | int4;
16 |
17 | type vector2 = float2 | int2;
18 | type vector3 = float3 | int3;
19 | type vector4 = float4 | int4;
20 |
21 | type vector = vector2 | vector3 | vector4;
22 |
23 | type vectorOrScalar = vector | scalar;
24 |
25 | type float2x2 = [float, float, float, float];
26 | type float3x3 = [float, float, float, float, float, float, float, float, float];
27 | type float4x4 = [
28 | float,
29 | float,
30 | float,
31 | float,
32 | float,
33 | float,
34 | float,
35 | float,
36 | float,
37 | float,
38 | float,
39 | float,
40 | float,
41 | float,
42 | float,
43 | float
44 | ];
45 |
--------------------------------------------------------------------------------
/lang/shadeup/library/ui.ts:
--------------------------------------------------------------------------------
1 | export namespace ui {
2 | export function puck(position: float2): float2 {
3 | return (window as any)._SHADEUP_UI_PUCK(position);
4 | }
5 |
6 | export function draggable(position: float2, radius: float = 10): float2 {
7 | return (window as any)._SHADEUP_UI_PUCK(position, radius, true);
8 | }
9 |
10 | export function textbox(value: string): string {
11 | return (window as any)._SHADEUP_UI_CONTROL('textbox', value);
12 | }
13 |
14 | export function slider(value: float, min: float, max: float): float {
15 | return (window as any)._SHADEUP_UI_SLIDER(value, { min, max });
16 | }
17 |
18 | export function label(text: string): void {
19 | return (window as any)._SHADEUP_UI_CONTROL('label', text);
20 | }
21 |
22 | export function checkbox(value: bool): bool {
23 | return (window as any)._SHADEUP_UI_CONTROL('checkbox', value);
24 | }
25 |
26 | export function combo(value: string, options: string[]): string {
27 | return (window as any)._SHADEUP_UI_CONTROL('combo', value, { options });
28 | }
29 |
30 | export function group(text: string): void {
31 | return (window as any)._SHADEUP_UI_CONTROL('group', text);
32 | }
33 |
34 | export function button(text: string): bool {
35 | return (window as any)._SHADEUP_UI_CONTROL('button', false, { text });
36 | }
37 |
38 | export function pop(): void {
39 | (window as any)._SHADEUP_UI_CONTROL('pop');
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/lang/shadeup/symbol.ts:
--------------------------------------------------------------------------------
1 | export class ShadeupExternalSymbol {
2 | name: string = '';
3 | kind: string = '';
4 |
5 | outType: string = '';
6 | parameters: [string, string, boolean][] = [];
7 |
8 | fields: [string, string][] = [];
9 | methods: ShadeupExternalSymbol[] = [];
10 |
11 | js: string = '';
12 |
13 | constructor(name: string, kind: string) {
14 | this.name = name;
15 | this.kind = kind;
16 | }
17 |
18 | static makeFunction(
19 | name: string,
20 | outType: string,
21 | parameters: [string, string, boolean][],
22 | source: string
23 | ): ShadeupExternalSymbol {
24 | let symbol = new ShadeupExternalSymbol(name, 'function');
25 | symbol.outType = outType;
26 | symbol.parameters = parameters;
27 | symbol.js = source;
28 |
29 | return symbol;
30 | }
31 |
32 | static makeVariable(name: string, outType: string): ShadeupExternalSymbol {
33 | const symbol = new ShadeupExternalSymbol(name, 'variable');
34 | symbol.outType = outType;
35 | return symbol;
36 | }
37 |
38 | static makeType(
39 | name: string,
40 | fields: [string, string][],
41 | methods: ShadeupExternalSymbol[]
42 | ): ShadeupExternalSymbol {
43 | let symbol = new ShadeupExternalSymbol(name, 'type');
44 | symbol.fields = fields;
45 | symbol.methods = methods;
46 | return symbol;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lang/shadeup/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';
3 | import wasm from 'vite-plugin-wasm';
4 | // const prefix = `monaco-editor/esm/vs`;
5 | import { sveltekit } from '@sveltejs/kit/vite';
6 | import nodeResolve from '@rollup/plugin-node-resolve';
7 | import createExternal from 'vite-plugin-external';
8 | export default defineConfig({
9 | plugins: [
10 | wasm(),
11 | nodeResolve(),
12 | createExternal({
13 | externals: {
14 | typescript: 'typescript',
15 | chalk: 'chalk',
16 | '@typescript/vfs': '@typescript/vfs'
17 | }
18 | })
19 | ],
20 | build: {
21 | commonjsOptions: {
22 | transformMixedEsModules: true
23 | },
24 | lib: {
25 | // Could also be a dictionary or array of multiple entry points
26 | entry: './compiler/simple.ts',
27 | name: 'ShadeupCompiler',
28 | // the proper extensions will be added
29 | fileName: 'shadeup-compiler'
30 | },
31 | outDir: '../../../compiler-api/',
32 | sourcemap: false
33 | },
34 | esbuild: {
35 | keepNames: false
36 | },
37 | resolve: {
38 | alias: {
39 | src: '/src',
40 | punycode: 'punycode/punycode.js',
41 | '/std_math': '../shadeup-frontend/lib/std/math.ts'
42 | }
43 | },
44 | worker: {
45 | format: 'es',
46 | plugins: [wasm()]
47 | },
48 | optimizeDeps: {
49 | esbuildOptions: {
50 | define: {
51 | self: 'globalThis',
52 | global: 'globalThis'
53 | },
54 | plugins: [
55 | NodeGlobalsPolyfillPlugin({
56 | process: true,
57 | buffer: true
58 | })
59 | ]
60 | }
61 | },
62 | server: {
63 | fs: {
64 | // Allow serving files from one level up to the project root
65 | allow: ['..']
66 | }
67 | }
68 | });
69 |
--------------------------------------------------------------------------------
/lang/tree-sitter/.gitignore:
--------------------------------------------------------------------------------
1 | target
--------------------------------------------------------------------------------
/lang/tree-sitter/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "useTabs": true,
3 | "singleQuote": true,
4 | "trailingComma": "none",
5 | "printWidth": 100,
6 |
7 | "pluginSearchDirs": ["."],
8 | "overrides": [
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/lang/tree-sitter/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | version = 3
4 |
5 | [[package]]
6 | name = "aho-corasick"
7 | version = "0.7.20"
8 | source = "registry+https://github.com/rust-lang/crates.io-index"
9 | checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
10 | dependencies = [
11 | "memchr",
12 | ]
13 |
14 | [[package]]
15 | name = "cc"
16 | version = "1.0.79"
17 | source = "registry+https://github.com/rust-lang/crates.io-index"
18 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
19 |
20 | [[package]]
21 | name = "memchr"
22 | version = "2.5.0"
23 | source = "registry+https://github.com/rust-lang/crates.io-index"
24 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
25 |
26 | [[package]]
27 | name = "regex"
28 | version = "1.7.1"
29 | source = "registry+https://github.com/rust-lang/crates.io-index"
30 | checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733"
31 | dependencies = [
32 | "aho-corasick",
33 | "memchr",
34 | "regex-syntax",
35 | ]
36 |
37 | [[package]]
38 | name = "regex-syntax"
39 | version = "0.6.28"
40 | source = "registry+https://github.com/rust-lang/crates.io-index"
41 | checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
42 |
43 | [[package]]
44 | name = "tree-sitter"
45 | version = "0.20.9"
46 | source = "registry+https://github.com/rust-lang/crates.io-index"
47 | checksum = "d4423c784fe11398ca91e505cdc71356b07b1a924fc8735cfab5333afe3e18bc"
48 | dependencies = [
49 | "cc",
50 | "regex",
51 | ]
52 |
53 | [[package]]
54 | name = "tree-sitter-shadeup"
55 | version = "0.0.1"
56 | dependencies = [
57 | "cc",
58 | "tree-sitter",
59 | ]
60 |
--------------------------------------------------------------------------------
/lang/tree-sitter/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "tree-sitter-shadeup"
3 | description = "shadeup grammar for the tree-sitter parsing library"
4 | version = "0.0.1"
5 | keywords = ["incremental", "parsing", "shadeup"]
6 | categories = ["parsing", "text-editors"]
7 | repository = "https://github.com/tree-sitter/tree-sitter-shadeup"
8 | edition = "2021"
9 | license = "MIT"
10 |
11 | build = "bindings/rust/build.rs"
12 | include = [
13 | "bindings/rust/*",
14 | "grammar.js",
15 | "queries/*",
16 | "src/*",
17 | ]
18 |
19 | [lib]
20 | path = "bindings/rust/lib.rs"
21 |
22 | [dependencies]
23 | tree-sitter = "~0.20.3"
24 |
25 | [build-dependencies]
26 | cc = "1.0"
27 |
--------------------------------------------------------------------------------
/lang/tree-sitter/binding.gyp:
--------------------------------------------------------------------------------
1 | {
2 | "targets": [
3 | {
4 | "target_name": "tree_sitter_shadeup_binding",
5 | "include_dirs": [
6 | "
3 | #include "nan.h"
4 |
5 | using namespace v8;
6 |
7 | extern "C" TSLanguage * tree_sitter_shadeup();
8 |
9 | namespace {
10 |
11 | NAN_METHOD(New) {}
12 |
13 | void Init(Local