xp-framework / compiler

Compiles future PHP to today's PHP.
19 stars 0 forks source link

Move responsibility for creating result to emitter #135

Closed thekid closed 2 years ago

thekid commented 2 years ago

This way, emitters can control the implementation they want to work with.

thekid commented 2 years ago

...and Result should be an abstract base class with a slim interface

thekid commented 2 years ago

...and Result should be an abstract base class with a slim interface

@FileSystemCL<./src/main/php>
public class lang.ast.emit.Result implements lang.Closeable {
  public var $out
  public var $codegen
  public var $meta
  public var $locals
  public var $stack

  public function __construct(io.streams.OutputStream $out)

  protected function initialize(): void
  protected function finalize(): void
  public function close(): void
}