Refactor: Use ES Modules in grammar definition

This commit is contained in:
2025-09-26 07:20:54 -07:00
parent f32744e660
commit d0bc019400

View File

@@ -1,7 +1,7 @@
@{% @{%
const moo = require('moo'); import moo from 'moo';
const lexer = moo.compile({ export const lexer = moo.compile({
ws: /[ \t]+/, ws: /[ \t]+/,
nl: { match: /\n/, lineBreaks: true }, nl: { match: /\n/, lineBreaks: true },
comment: /\/\/.*?$/, comment: /\/\/.*?$/,