logo       

4130 - in trunk/Template: src src/parsers/source_to_tst/implementations src: msg#00303

web.ezcomponents.cvs

Subject: 4130 - in trunk/Template: src src/parsers/source_to_tst/implementations src/parsers/tst_to_ast/implementations tests/regression_tests/array_append tests/regression_tests/array_fetch/incorrect tests/regression_tests/expressions/incorrect_array_fetch [eZComponents: Trunk]

Author: Raymond Bosman
Date: 2006-11-29 14:45:41 +0100 (Wed, 29 Nov 2006)
New Revision: 4130

Log:
- Improved the error message for incorrect array appends.
- Fixed a problem that the left hand side of an array assignment could have
an expression.

Modified:
trunk/Template/src/error_messages.php
trunk/Template/src/parsers/source_to_tst/implementations/expression.php

trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
trunk/Template/tests/regression_tests/array_append/no_assignment.out
trunk/Template/tests/regression_tests/array_append/wrong_use.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0012.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0013.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0014.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0015.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0016.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0017.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0018.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0019.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0020.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0021.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0022.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0023.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0024.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0025.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0026.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0027.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0028.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0029.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0030.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0031.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0032.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0033.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0034.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0035.out
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0036.out

trunk/Template/tests/regression_tests/expressions/incorrect_array_fetch/array_append.out

Modified: trunk/Template/src/error_messages.php
===================================================================
--- trunk/Template/src/error_messages.php 2006-11-29 12:05:49 UTC (rev
4129)
+++ trunk/Template/src/error_messages.php 2006-11-29 13:45:41 UTC (rev
4130)
@@ -54,7 +54,9 @@
// Unexpected brackets
const MSG_UNEXPECTED_SQUARE_BRACKET_OPEN = "Unexpected opening square
bracket '['. Array fetch needs a variable. ( \$variable [ 0 ] )";
const MSG_UNEXPECTED_ARRAY_APPEND = "Unexpected array append
'[]'. Did you forget an expression between the brackets?";
+ const MSG_EXPECT_ARRAY_APPEND_ASSIGNMENT = "Expecting an assignment '='
after an array append '[]'.";

+
const MSG_ASSIGNMENT_NOT_ALLOWED = "A 'raw' block cannot modify
a variable.";

// Uppercase problems

Modified:
trunk/Template/src/parsers/source_to_tst/implementations/expression.php
===================================================================
--- trunk/Template/src/parsers/source_to_tst/implementations/expression.php
2006-11-29 12:05:49 UTC (rev 4129)
+++ trunk/Template/src/parsers/source_to_tst/implementations/expression.php
2006-11-29 13:45:41 UTC (rev 4130)
@@ -42,6 +42,9 @@
public $rootOperator;


+ public $foundArrayAppend = false;
+
+
/**
* Passes control to parent.
* @param int $minPrecedence The minimum precedence level which is allowed
@@ -74,10 +77,15 @@

$this->findNextElement();

+ $canDoAssignment = true;
+ $this->foundArrayAppend = false;
+
// If it has a preOperator, it must have an operand.
$match = "";
- if ( $this->parsePreModifyingOperator( $cursor, $match ) )
+ $type = "";
+ if ( $this->parsePreModifyingOperator( $cursor, $match ) ) // Parse:
--, ++
{
+ $canDoAssignment = false;
if ( !$this->parseOperand( $cursor, array( "Variable" ), false ) )
{
throw new ezcTemplateParserException( $this->parser->source,
$cursor, $cursor, ezcTemplateSourceToTstErrorMessages::MSG_EXPECT_VARIABLE );
@@ -85,8 +93,9 @@

return true;
}
- elseif( $this->parsePreOperator( $cursor, $match ) )
+ elseif( $this->parsePreOperator( $cursor, $match ) ) // Parse: -, +, !
{
+ $canDoAssignment = false;
if ( !$this->parseOperand( $cursor, array(), false ) )
{
throw new ezcTemplateParserException( $this->parser->source,
$cursor, $cursor, ezcTemplateSourceToTstErrorMessages::MSG_EXPECT_OPERAND );
@@ -111,20 +120,40 @@
// Operator check.
$this->findNextElement();

- if ( !$this->parseOperator( $cursor ) )
+ if( $this->foundArrayAppend )
{
- return true;
+ // After an array append follows an assignment.
+ if( !$this->parseAssignmentOperator( $cursor ) )
+ {
+ throw new ezcTemplateParserException(
$this->parser->source, $cursor, $cursor,
+
ezcTemplateSourceToTstErrorMessages::MSG_EXPECT_ARRAY_APPEND_ASSIGNMENT );
+ }
}
+ else
+ {
+ $operator = $this->parseOperator( $cursor, $canDoAssignment );
+ if ( !$operator )
+ {
+ return true;
+ }

+ if( $type != "Variable" || $operator != "AssignmentOperator" )
+ {
+ $canDoAssignment = false;
+ }
+ }
+
// An operand is mandantory.
$failedCursor = clone $cursor;
$this->findNextElement();

+ $this->foundArrayAppend = false;
+
// Modifying operators are not allowed anymore.
-
$this->parsePreOperator( $cursor, $match );

- if ( !$this->parseOperand( $cursor, array(), false ) )
+ $type = $this->parseOperand( $cursor, array(), false );
+ if ( !$type )
{
throw new ezcTemplateParserException( $this->parser->source,
$cursor, $cursor,
ezcTemplateSourceToTstErrorMessages::MSG_EXPECT_NON_MODIFYING_OPERAND );
}
@@ -365,6 +394,12 @@
if ( $allowArrayAppend && $cursor->match( "]" ) )
{
$operator = new ezcTemplateArrayAppendOperatorTstNode(
$this->parser->source, $this->startCursor, $cursor );
+ $this->foundArrayAppend = true;
+
+ $this->currentOperator =
$this->parser->handleOperatorPrecedence( $this->currentOperator, $operator );
+ $this->lastCursor = clone $cursor;
+
+ return true;
}
else
{
@@ -401,8 +436,24 @@
return ($operator !== null);
}

+ protected function parseAssignmentOperator( $cursor )
+ {
+ if( $cursor->match( "=" ) )
+ {
+ //$cursor->advance( 1 );
+ $function = "ezcTemplateAssignmentOperatorTstNode";
+ $operator = new $function( $this->parser->source, clone
$this->lastCursor, $cursor );

- protected function parseOperator( $cursor )
+ $this->currentOperator =
$this->parser->handleOperatorPrecedence( $this->currentOperator, $operator );
+ $this->parser->reportElementCursor( $operator->startCursor,
$operator->endCursor, $operator );
+
+ return true;
+ }
+
+ return false;
+ }
+
+ protected function parseOperator( $cursor, $canDoAssignment = true )
{
// Try som generic operators
$operator = null;
@@ -424,8 +475,7 @@
array( 1,
array( '+', '-', '.',
'*', '/', '%',
- '<', '>',
- '=' ) ) );
+ '<', '>', '=' ) ) );
foreach ( $operatorSymbols as $symbolEntry )
{
$chars = $cursor->current( $symbolEntry[0] );
@@ -441,10 +491,18 @@
return false;
}

+ // Cannot do an assignment right now.
+ if( $operatorName == "=" && !$canDoAssignment)
+ {
+ return false;
+ }
+
+
if ( $operatorName !== false )
{
$operatorStartCursor = clone $cursor;
$cursor->advance( strlen( $operatorName ) );
+
$operatorMap = array( '+' => 'PlusOperator',
'-' => 'MinusOperator',
'.' => 'ConcatOperator',
@@ -494,7 +552,7 @@
$operator->precedence < $this->minPrecedence )
{
$cursor->copy( $operatorStartCursor );
- return true;
+ return $operatorName;
}

$this->currentOperator =
$this->parser->handleOperatorPrecedence( $this->currentOperator, $operator );
@@ -508,7 +566,7 @@
$this->allowIdentifier = true;
}

- return true;
+ return $operatorName;
}

return false;

Modified:
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
===================================================================
---
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
2006-11-29 13:45:41 UTC (rev 4130)
@@ -999,19 +999,35 @@

public function visitAssignmentOperatorTstNode(
ezcTemplateAssignmentOperatorTstNode $type )
{
+ //var_dump ( $type->parameters );
+ //exit();
+
+ $this->allowArrayAppend = true;
$this->isCycle = false;
+
$astNode = new ezcTemplateAssignmentOperatorAstNode();
- $this->previousType = $astNode;
+ $this->previousType = $astNode; // TODO , can be removed???

- $this->allowArrayAppend = true;
+ $parameters = sizeof( $type->parameters );
+
$astNode->appendParameter( $type->parameters[0]->accept( $this ) ); //
Set cycle, if it's a cycle.
+
+ for ($i = 1; $i < $parameters - 1; $i++ )
+ {
+ $astNode->appendParameter( $type->parameters[$i]->accept( $this )
); // Set cycle, if it's a cycle.
+ $tmp = new ezcTemplateAssignmentOperatorAstNode();
+ $tmp->appendParameter( $astNode );
+ $astNode = $tmp;
+ }
+
$this->allowArrayAppend = false;
- $assignment = $type->parameters[1]->accept( $this );

+ $assignment = $type->parameters[$i]->accept( $this );
+
if ( $this->isCycle && !( $assignment->typeHint &
ezcTemplateAstNode::TYPE_ARRAY ) )
{
- throw new ezcTemplateParserException( $type->source,
$type->parameters[1]->startCursor,
- $type->parameters[1]->startCursor,
ezcTemplateSourceToTstErrorMessages::MSG_EXPECT_ARRAY );
+ throw new ezcTemplateParserException( $type->source,
$type->parameters[$i]->startCursor,
+ $type->parameters[$i]->startCursor,
ezcTemplateSourceToTstErrorMessages::MSG_EXPECT_ARRAY );
}

$astNode->appendParameter( $assignment );

Modified: trunk/Template/tests/regression_tests/array_append/no_assignment.out
===================================================================
--- trunk/Template/tests/regression_tests/array_append/no_assignment.out
2006-11-29 12:05:49 UTC (rev 4129)
+++ trunk/Template/tests/regression_tests/array_append/no_assignment.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:2:4: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:2:6: Expecting an assignment '=' after an array append '[]'.

{$a[]}
- ^
+ ^

Modified: trunk/Template/tests/regression_tests/array_append/wrong_use.out
===================================================================
--- trunk/Template/tests/regression_tests/array_append/wrong_use.out
2006-11-29 12:05:49 UTC (rev 4129)
+++ trunk/Template/tests/regression_tests/array_append/wrong_use.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:4: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:7: Expecting an assignment '=' after an array append '[]'.

{$a[] . $b = 2}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0012.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0012.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0012.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:3:14: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:3:12: Expecting an assignment '=' after an array append '[]'.

{$a[0][1][][2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0013.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0013.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0013.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:3:15: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:3:13: Expecting an assignment '=' after an array append '[]'.

{$a[0][1][] [2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0014.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0014.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0014.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:3: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:1: Expecting an assignment '=' after an array append '[]'.

[2]}
- ^
+^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0015.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0015.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0015.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:3:19: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:3:17: Expecting an assignment '=' after an array append '[]'.

{$a[0][1][]/*c*/[2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0016.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0016.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0016.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:3: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:1: Expecting an assignment '=' after an array append '[]'.

[2]}
- ^
+^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0017.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0017.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0017.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:3:15: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:3:13: Expecting an assignment '=' after an array append '[]'.

{$a[0][1] [][2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0018.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0018.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0018.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:3:16: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:3:14: Expecting an assignment '=' after an array append '[]'.

{$a[0][1] [] [2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0019.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0019.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0019.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:3: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:1: Expecting an assignment '=' after an array append '[]'.

[2]}
- ^
+^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0020.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0020.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0020.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:3:20: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:3:18: Expecting an assignment '=' after an array append '[]'.

{$a[0][1] []/*c*/[2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0021.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0021.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0021.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:3: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:1: Expecting an assignment '=' after an array append '[]'.

[2]}
- ^
+^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0022.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0022.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0022.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:5: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:3: Expecting an assignment '=' after an array append '[]'.

[][2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0023.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0023.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0023.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:6: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:4: Expecting an assignment '=' after an array append '[]'.

[] [2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0024.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0024.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0024.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:5:3: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:5:1: Expecting an assignment '=' after an array append '[]'.

[2]}
- ^
+^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0025.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0025.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0025.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:10: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:8: Expecting an assignment '=' after an array append '[]'.

[]/*c*/[2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0026.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0026.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0026.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:5:3: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:5:1: Expecting an assignment '=' after an array append '[]'.

[2]}
- ^
+^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0027.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0027.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0027.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:3:19: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:3:17: Expecting an assignment '=' after an array append '[]'.

{$a[0][1]/*c*/[][2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0028.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0028.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0028.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:3:20: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:3:18: Expecting an assignment '=' after an array append '[]'.

{$a[0][1]/*c*/[] [2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0029.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0029.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0029.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:3: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:1: Expecting an assignment '=' after an array append '[]'.

[2]}
- ^
+^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0030.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0030.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0030.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:3:24: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:3:22: Expecting an assignment '=' after an array append '[]'.

{$a[0][1]/*c*/[]/*c*/[2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0031.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0031.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0031.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:3: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:1: Expecting an assignment '=' after an array append '[]'.

[2]}
- ^
+^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0032.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0032.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0032.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:5: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:3: Expecting an assignment '=' after an array append '[]'.

[][2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0033.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0033.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0033.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:6: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:4: Expecting an assignment '=' after an array append '[]'.

[] [2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0034.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0034.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0034.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:5:3: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:5:1: Expecting an assignment '=' after an array append '[]'.

[2]}
- ^
+^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0035.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0035.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0035.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:4:10: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:4:8: Expecting an assignment '=' after an array append '[]'.

[]/*c*/[2]}
- ^
+ ^

Modified:
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0036.out
===================================================================
---
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0036.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/array_fetch/incorrect/indexes_0036.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:5:3: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:5:1: Expecting an assignment '=' after an array append '[]'.

[2]}
- ^
+^

Modified:
trunk/Template/tests/regression_tests/expressions/incorrect_array_fetch/array_append.out
===================================================================
---
trunk/Template/tests/regression_tests/expressions/incorrect_array_fetch/array_append.out
2006-11-29 12:05:49 UTC (rev 4129)
+++
trunk/Template/tests/regression_tests/expressions/incorrect_array_fetch/array_append.out
2006-11-29 13:45:41 UTC (rev 4130)
@@ -1,4 +1,4 @@
-mock:2:13: Unexpected array append '[]'. Did you forget an expression between
the brackets?
+mock:2:16: Expecting an assignment '=' after an array append '[]'.

{var $b = $a[] + 2}
- ^
+ ^



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise