Skip to content

Commit

Permalink
Don't early-reference Language
Browse files Browse the repository at this point in the history
…because it isn't there yet.

(Looking forward to this being fixed in `web-tree-sitter` 0.25.)
  • Loading branch information
savetheclocktower committed Feb 20, 2025
1 parent 0c5cf4a commit 653660a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/wasm-tree-sitter-grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const path = require('path');
const Grim = require('grim');
const dedent = require('dedent');
const Parser = require('./web-tree-sitter');
const Language = Parser.Language;
const { CompositeDisposable, Emitter } = require('event-kit');
const { File } = require('pathwatcher');
const { normalizeDelimiters } = require('./comment-utils.js');
Expand Down Expand Up @@ -89,7 +88,7 @@ module.exports = class WASMTreeSitterGrammar {
if (this.LANGUAGE_CACHE.has(grammarPath)) {
return this.LANGUAGE_CACHE.get(grammarPath);
}
let language = await Language.load(grammarPath);
let language = await Parser.Language.load(grammarPath);
this.LANGUAGE_CACHE.set(grammarPath, language);
return language;
}
Expand Down

0 comments on commit 653660a

Please sign in to comment.