Skip to content
This repository was archived by the owner on Sep 20, 2021. It is now read-only.

Arithmetic\Evaluate() - #1

Closed
stephpy wants to merge 4 commits into
hoaproject:masterfrom
rezzza:evaluer_without_tests
Closed

Arithmetic\Evaluate()#1
stephpy wants to merge 4 commits into
hoaproject:masterfrom
rezzza:evaluer_without_tests

Conversation

@stephpy

Copy link
Copy Markdown
Member

Evaluate mathematic operations

<?php$compiler = \Hoa\Compiler\Llk::load(
new \Hoa\File\Read('hoa://Library/Math/Arithmetic/Grammar.pp')
);
$visitor = new \Hoa\Math\Visitor\Arithmetic();
$result = $visitor->visit($compiler->parse('10+10'));

I wrote tests on an other branch, theses passes :)

https://github.com/rezzza/Math/blob/evaluer/tests/units/Hoa/Math/Visitor/Arithmetic.php

@Hywan

Copy link
Copy Markdown
Member

Done. Thank you for your contributions!

@stephpystephpy closed this Sep 19, 2012
Bhoat pushed a commit that referenced this pull request Aug 24, 2016
Validate with float 0.0 before throwing exception
Bhoat pushed a commit that referenced this pull request Jan 20, 2017
Add INFINITE constant to Aritmetic
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@stephpy@Hywan