Skip to content

Instantly share code, notes, and snippets.

@stephpy
Created August 26, 2013 08:51

Revisions

  1. stephpy renamed this gist Aug 26, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.txt → gistfile1.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    <?php

    $operation = '1 + 1'; // ...

    $visitor = new \Hoa\Math\Visitor\Arithmetic();
  2. stephpy created this gist Aug 26, 2013.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    $operation = '1 + 1'; // ...

    $visitor = new \Hoa\Math\Visitor\Arithmetic();
    $compiler = \Hoa\Compiler\Llk::load(
    new \Hoa\File\Read('hoa://Library/Math/Arithmetic.pp')
    );

    $visitor->visit(
    $compiler->parse($operation)
    );