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

Allow only lowercase boolean literals #219

Merged
merged 14 commits into from
Jan 21, 2024
Merged
2 changes: 1 addition & 1 deletion cli/src/grading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { FileSystem } from "@davidsouther/jiffies/lib/esm/fs.js";
import { join, parse } from "path";

import { NodeFileSystemAdapter } from "./node_file_system_adapter.js";
import { NodeFileSystemAdapter } from "@davidsouther/jiffies/lib/esm/fs_node.js";

/**
* Given a FileSystem wrapper, curry a function that loads the necessary files for running an HDL test.
Expand Down
39 changes: 0 additions & 39 deletions cli/src/node_file_system_adapter.ts

This file was deleted.

2 changes: 1 addition & 1 deletion cli/src/testrunner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FileSystem } from "@davidsouther/jiffies/lib/esm/fs.js";
import { NodeFileSystemAdapter } from "./node_file_system_adapter.js";
import { NodeFileSystemAdapter } from "@davidsouther/jiffies/lib/esm/fs_node.js";
import { runner } from "@nand2tetris/simulator/projects/runner.js";
import { Assignment, Assignments } from "@nand2tetris/projects/index.js";
import { parse } from "path";
Expand Down
30 changes: 15 additions & 15 deletions components/src/stores/chip.store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { ImmPin } from "src/pinout.js";

function testChipStore(
fs: Record<string, string> = {
"/projects/01/Not/Not.hdl": not.hdl,
"/projects/01/Not/Not.tst": not.tst,
"/projects/01/Not/Not.cmp": not.cmp,
"projects/01/Not/Not.hdl": not.hdl,
"projects/01/Not/Not.tst": not.tst,
"projects/01/Not/Not.cmp": not.cmp,
},
storage: Record<string, string> = {}
) {
Expand Down Expand Up @@ -59,9 +59,9 @@ describe("ChipStore", () => {

it("reloads initial chip not", async () => {
const store = testChipStore({
"/projects/01/Not/Not.hdl": not.hdl,
"/projects/01/Not/Not.tst": not.tst,
"/projects/01/Not/Not.cmp": not.cmp,
"projects/01/Not/Not.hdl": not.hdl,
"projects/01/Not/Not.tst": not.tst,
"projects/01/Not/Not.cmp": not.cmp,
});

await store.actions.initialize();
Expand All @@ -77,12 +77,12 @@ describe("ChipStore", () => {
it("loads saved state", () => {
const { state } = testChipStore(
{
"/projects/01/Not/Not.hdl": not.hdl,
"/projects/01/Not/Not.tst": not.tst,
"/projects/01/Not/Not.cmp": not.cmp,
"/projects/03/Bit/Bit.hdl": bit.hdl,
"/projects/03/Bit/Bit.tst": bit.tst,
"/projects/03/Bit/Bit.cmp": bit.cmp,
"projects/01/Not/Not.hdl": not.hdl,
"projects/01/Not/Not.tst": not.tst,
"projects/01/Not/Not.cmp": not.cmp,
"projects/03/Bit/Bit.hdl": bit.hdl,
"projects/03/Bit/Bit.tst": bit.tst,
"projects/03/Bit/Bit.cmp": bit.cmp,
},
{
"/chip/project": "03",
Expand Down Expand Up @@ -123,9 +123,9 @@ describe("ChipStore", () => {
describe("execution", () => {
const state = cleanState(async () => {
const store = testChipStore({
"/projects/01/Not/Not.hdl": not.hdl,
"/projects/01/Not/Not.tst": not.tst,
"/projects/01/Not/Not.cmp": not.cmp,
"projects/01/Not/Not.hdl": not.hdl,
"projects/01/Not/Not.tst": not.tst,
"projects/01/Not/Not.cmp": not.cmp,
});
await store.actions.initialize();
return { store };
Expand Down
2 changes: 1 addition & 1 deletion extension/views/hdl/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

const baseContext: BaseContext = {
fs: new FileSystem(
new ObjectFileSystemAdapter({ "/projects/01/Not.hdl": Not.hdl })
new ObjectFileSystemAdapter({ "projects/01/Not.hdl": Not.hdl })
),
storage: {},
status: "",
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"dependencies": {
"@davidsouther/jiffies": "^2.0.6",
"@davidsouther/jiffies": "^2.1.6",
"@nand2tetris/projects": "^1.0.0",
"@nand2tetris/runner": "^1.0.0",
"@types/node": "^20.9.0",
Expand Down
2 changes: 1 addition & 1 deletion simulator/src/chip/builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe("Chip Builder", () => {

it("looks up unknown chips in fs", async () => {
const fs = new FileSystem(
new ObjectFileSystemAdapter({ "/Copy.hdl": COPY_HDL })
new ObjectFileSystemAdapter({ "Copy.hdl": COPY_HDL })
);

let foo: Chip;
Expand Down
Loading