Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
robsimmons committed Nov 18, 2023
1 parent 2615179 commit 883374b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/engine/dataterm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Data, expose, hide } from "../datastructures/data";
import { Pattern } from "../langauge/terms";
import { Data, expose, hide } from '../datastructures/data';
import { Pattern } from '../langauge/terms';

export type Substitution = { [varName: string]: Data };

Expand Down
5 changes: 2 additions & 3 deletions src/langauge/terms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export type ParsedPattern =
| { type: 'wildcard'; name: null | string; loc: SourceLocation }
| { type: 'var'; name: string; loc: SourceLocation };


export function termToString(t: Pattern, needsParens = true): string {
switch (t.type) {
case 'triv':
Expand All @@ -51,8 +50,8 @@ export function termToString(t: Pattern, needsParens = true): string {
return t.args.length === 0
? name
: needsParens
? `(${name} ${t.args.map((arg) => termToString(arg)).join(' ')})`
: `${name} ${t.args.map((arg) => termToString(arg)).join(' ')}`;
? `(${name} ${t.args.map((arg) => termToString(arg)).join(' ')})`
: `${name} ${t.args.map((arg) => termToString(arg)).join(' ')}`;
}
case 'var':
return t.name;
Expand Down

0 comments on commit 883374b

Please sign in to comment.