Skip to content

Commit

Permalink
Attempting esm fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRayCode committed Apr 4, 2024
1 parent e403be7 commit 81288f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
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

0 comments on commit 81288f7

Please sign in to comment.