Skip to content

Commit

Permalink
[lang1] & [lang0] use upstream ParsingError
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Mar 28, 2024
1 parent b620bce commit a4d5d42
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/lang0/errors/ParsingError.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/lang0/errors/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { ParsingError } from "@cicada-lang/sexp"
export * from "./ErrorReport.js"
export * from "./LangError.js"
3 changes: 2 additions & 1 deletion src/lang0/run/load.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Fetcher } from "@cicada-lang/framework/lib/fetcher/index.js"
import { ParsingError } from "@cicada-lang/sexp"
import fs from "node:fs"
import * as Errors from "../errors/index.js"
import { createMod, modResolve, type Mod } from "../mod/index.js"
Expand Down Expand Up @@ -34,7 +35,7 @@ export async function load(

return mod
} catch (error) {
if (error instanceof Errors.ParsingError) {
if (error instanceof ParsingError) {
throw new Errors.ErrorReport(error.report(text))
}

Expand Down
1 change: 0 additions & 1 deletion src/lang1/errors/ParsingError.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/lang1/errors/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { ParsingError } from "@cicada-lang/sexp"
export * from "./ErrorReport.js"
export * from "./LangError.js"
3 changes: 2 additions & 1 deletion src/lang1/run/load.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Fetcher } from "@cicada-lang/framework/lib/fetcher/index.js"
import { ParsingError } from "@cicada-lang/sexp"
import fs from "node:fs"
import * as Errors from "../errors/index.js"
import { createMod, type Mod } from "../mod/index.js"
Expand Down Expand Up @@ -34,7 +35,7 @@ export async function load(

return mod
} catch (error) {
if (error instanceof Errors.ParsingError) {
if (error instanceof ParsingError) {
throw new Errors.ErrorReport(error.report(text))
}

Expand Down

0 comments on commit a4d5d42

Please sign in to comment.