Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting esm fix #16

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"engines": {
"node": ">=16"
},
"version": "3.0.1",
"version": "3.0.2",
"type": "module",
"description": "A GLSL ES 1.0 and 3.0 parser and preprocessor that can preserve whitespace and comments",
"scripts": {
Expand Down
17 changes: 7 additions & 10 deletions src/parser/glsl-grammar.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@

// Global parser definitions, shared between all parsers
{{
// Apparently peggy can't handle an open curly brace in a string, see
// https://github.com/pegjs/pegjs/issues/187
const OPEN_CURLY = String.fromCharCode(123);

const {
import {
makeLocals,
collapse,
partial,
Expand All @@ -31,11 +27,12 @@
signature,
ifOnly,
xnil,
builtIns,
// This require() without a file extension is an intentional hack. For local
// development, this will find the TypeScript file grammar.ts. When publihsed
// to npm, it will find the compiled Javascript file grammar.js.
} = require('./grammar.js');
builtIns
} from './grammar.js';

// Apparently peggy can't handle an open curly brace in a string, see
// https://github.com/pegjs/pegjs/issues/187
const OPEN_CURLY = String.fromCharCode(123);
}}

// Local parser code, unique to each invocation of the parser
Expand Down
Loading