Skip to content

Commit

Permalink
drop the Stmt postfix for Stmt class
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Jul 29, 2023
1 parent a80eb14 commit 1956610
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Span } from "../span"
import { Stmt } from "../stmt"
import { createTrivialTypes } from "../type"

export class DefconsStmt implements Stmt {
export class Defcons implements Stmt {
constructor(
public name: string,
public inputArity: number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Span } from "../span"
import { Stmt } from "../stmt"
import { createTrivialTypes } from "../type"

export class DefelimStmt implements Stmt {
export class Defelim implements Stmt {
constructor(
public name: string,
public inputArity: number,
Expand Down
2 changes: 1 addition & 1 deletion src/lang/stmts/DefnetStmt.ts → src/lang/stmts/Defnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Span } from "../span"
import { Stmt } from "../stmt"
import { Word } from "../word"

export class DefnetStmt implements Stmt {
export class Defnet implements Stmt {
constructor(
public name: string,
public words: Array<Word>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Span } from "../span"
import { Stmt } from "../stmt"
import { Word } from "../word"

export class DefruleStmt implements Stmt {
export class Defrule implements Stmt {
constructor(
public start: string,
public end: string,
Expand Down
8 changes: 4 additions & 4 deletions src/lang/stmts/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./DefconsStmt"
export * from "./DefelimStmt"
export * from "./DefnetStmt"
export * from "./DefruleStmt"
export * from "./Defcons"
export * from "./Defelim"
export * from "./Defnet"
export * from "./Defrule"
8 changes: 4 additions & 4 deletions src/lang/syntax/matchStmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function matchStmt(sexp: Sexp): Stmt {
[
["defcons", v("name"), v("inputArity"), v("outputArity")],
({ name, inputArity, outputArity }) =>
new Stmts.DefconsStmt(
new Stmts.Defcons(
matchSymbol(name),
matchNumber(inputArity),
matchNumber(outputArity),
Expand All @@ -26,7 +26,7 @@ export function matchStmt(sexp: Sexp): Stmt {
[
["defelim", v("name"), v("inputArity"), v("outputArity")],
({ name, inputArity, outputArity }) =>
new Stmts.DefelimStmt(
new Stmts.Defelim(
matchSymbol(name),
matchNumber(inputArity),
matchNumber(outputArity),
Expand All @@ -36,12 +36,12 @@ export function matchStmt(sexp: Sexp): Stmt {
[
list(["defnet", v("name")], v("words")),
({ name, input, output, words }) =>
new Stmts.DefnetStmt(matchSymbol(name), matchExps(words), sexp.span),
new Stmts.Defnet(matchSymbol(name), matchExps(words), sexp.span),
],
[
list(["defrule", [v("start"), v("end")]], v("words")),
({ start, end, words }) =>
new Stmts.DefruleStmt(
new Stmts.Defrule(
matchSymbol(start),
matchSymbol(end),
matchExps(words),
Expand Down

0 comments on commit 1956610

Please sign in to comment.