diff options
author | Ivan Enderlin <ivan.enderlin@hoa-project.net> | 2013-04-16 14:24:28 +0200 |
---|---|---|
committer | Ivan Enderlin <ivan.enderlin@hoa-project.net> | 2013-04-16 14:24:28 +0200 |
commit | d7686611a91db048f43c0be3b4ffec295de6c623 (patch) | |
tree | cae6aafd195aacd55fddd50d01d7dee2521a7eca /Visitor | |
parent | 453e6fcdd3bab20a8b93ffac624ddacef55c90d8 (diff) | |
download | Praspel-d7686611a91db048f43c0be3b4ffec295de6c623.zip Praspel-d7686611a91db048f43c0be3b4ffec295de6c623.tar.gz Praspel-d7686611a91db048f43c0be3b4ffec295de6c623.tar.bz2 |
Rename @forexample to @description.
The @forexample has already a semantics defined in JML. Our @forexample
clause has a complete different semantics. In order to avoid confusion,
we rename it.
Diffstat (limited to 'Visitor')
-rw-r--r-- | Visitor/Compiler.php | 6 | ||||
-rw-r--r-- | Visitor/Interpreter.php | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Visitor/Compiler.php b/Visitor/Compiler.php index e8234cf..2d606d8 100644 --- a/Visitor/Compiler.php +++ b/Visitor/Compiler.php @@ -84,7 +84,7 @@ class Compiler implements \Hoa\Visitor\Visit { 'ensures', 'behavior', 'throwable', - 'forexample' + 'description' ); foreach($clauses as $clause) @@ -182,13 +182,13 @@ class Compiler implements \Hoa\Visitor\Visit { $eldnah ); } - elseif($element instanceof \Hoa\Praspel\Model\Forexample) { + elseif($element instanceof \Hoa\Praspel\Model\Description) { $parent = '$' . $element->getParent()->getId(); $variable = '$' . $element->getId(); $out = "\n" . $variable . ' = ' . $parent . - '->getClause(\'forexample\');' . "\n"; + '->getClause(\'description\');' . "\n"; foreach($element as $example) $out .= $variable . '[] = \'' . diff --git a/Visitor/Interpreter.php b/Visitor/Interpreter.php index 22e66ac..8357c5f 100644 --- a/Visitor/Interpreter.php +++ b/Visitor/Interpreter.php @@ -162,8 +162,8 @@ class Interpreter implements \Hoa\Visitor\Visit { $this->_current = $previous; break; - case '#forexample': - $this->_clause = $this->_root->getClause('forexample'); + case '#description': + $this->_clause = $this->_root->getClause('description'); $this->_clause[] = $element->getChild(0)->accept( $this, $handle, |