Skip to content

Commit

Permalink
Remove reuse interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel committed Sep 3, 2024
1 parent b1b4e0d commit d18d8b4
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions pdl/pdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,34 +125,6 @@ def exec_file(
return result


class PDL:
state: InterpreterState
result: Any
background: list[Message]
scope: ScopeType
trace: BlocksType
loc: LocationType

def __init__(self, pdl_file: str) -> None:
prog, loc = parse_file(pdl_file)
state = InterpreterState(yield_output=False)
result, background, scope, trace = process_prog(state, {}, prog, loc)
self.state = state
self.result = result
self.background = background
self.scope = scope
self.trace = trace
self.loc = loc

def call(self, f: str, args: dict[str, Any]):
block = CallBlock(call=f, args=args)
result, document, scope, trace = yield from step_call(
self.state, self.scope, block, self.loc
)
self.scope = scope
return result, document, scope, trace


def main():
parser = argparse.ArgumentParser("")
parser.add_argument(
Expand Down

0 comments on commit d18d8b4

Please sign in to comment.