ESM Imports

This commit is contained in:
Edaz 2021-06-19 23:59:17 +12:00 committed by GitHub
parent badcf30386
commit c0e27baa1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,11 @@
const { import {
tokenizer, tokenizer,
parser, parser,
transformer, transformer,
codeGenerator, codeGenerator,
compiler, compiler,
} = require('./the-super-tiny-compiler'); } from './the-super-tiny-compiler.ja';
const assert = require('assert'); import assert from 'assert/strict';
const input = '(add 2 (subtract 4 2))'; const input = '(add 2 (subtract 4 2))';
const output = 'add(2, subtract(4, 2));'; const output = 'add(2, subtract(4, 2));';