Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Nov 17, 2023
1 parent 127e160 commit e37df8a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ DefineDatatype & DatatypeDefinition
- `datatype <name>` -- to define trivial type for now
- pass parser `tests/`

`Begin` -- should call react

# net

[net] react.test.ts
Expand Down
4 changes: 4 additions & 0 deletions src/lang/evaluate/evaluate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ import { Value } from "../value"
import { evaluateBlock } from "./evaluateBlock"
import { evaluateDefinition } from "./evaluateDefinition"

// `EvaluateOptions` can be used to denote different modes of evaluation.

export interface EvaluateOptions {
//
}

// We return `Array<Value>` to handle possible multiple return values.

export function evaluate(
mod: Mod,
env: Env,
Expand Down
3 changes: 3 additions & 0 deletions src/lang/evaluate/evaluateBlockStmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import { Value, assertValueKind } from "../value"
import { EvaluateOptions } from "./evaluate"
import { evaluateOne } from "./evaluateOne"

// We use `null` to denote that this `BlockStmt`
// should not be viewed as returned results of this block.

export function evaluateBlockStmt(
mod: Mod,
env: Env,
Expand Down
2 changes: 2 additions & 0 deletions src/lang/execute/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { EvaluateOptions, evaluateBlock, evaluateParameters } from "../evaluate"
import { Mod, define } from "../mod"
import { Stmt } from "../stmt"

// We return `null` to late the type checker catch the uncovered switch cases.

export async function execute(mod: Mod, stmt: Stmt): Promise<null> {
try {
const options: EvaluateOptions = {}
Expand Down

0 comments on commit e37df8a

Please sign in to comment.