Subversion Repositories DevTools

Rev

Rev 2222 | Rev 2226 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2222 Rev 2224
Line 126... Line 126...
126
	}
126
	}
127
 
127
 
128
	return ( where->functionId );
128
	return ( where->functionId );
129
}
129
}
130
 
130
 
131
const bool readExpression( std::istream & stream, std::string & symbol, TokenId & token, DefinedVariableTable& variableTable )
131
const bool readExpression( std::istream & stream, std::string & symbol, TokenId & token, EvaluationContext& evaluationContext )
132
{
132
{
133
	symbol.erase();
133
	symbol.erase();
134
 
134
 
135
	char character = 0;
135
	char character = 0;
136
	while ( stream.get( character ).good() )
136
	while ( stream.get( character ).good() )
Line 154... Line 154...
154
	}
154
	}
155
 
155
 
156
	// Only do this when we didn't fail reading from the stream.
156
	// Only do this when we didn't fail reading from the stream.
157
	if ( stream.good() || stream.eof() )
157
	if ( stream.good() || stream.eof() )
158
	{
158
	{
159
		token = ( variableTable.isVariable( symbol )
159
		token = ( evaluationContext.getSymbolTable().isVariable( symbol, evaluationContext )
160
			? TOKENID_VARIABLE
160
			? TOKENID_VARIABLE
161
			: TOKENID_CONSTANT );
161
			: TOKENID_CONSTANT );
162
		return ( true );
162
		return ( true );
163
	}
163
	}
164
 
164
 
Line 240... Line 240...
240
			argument list	::= argument[, argument list ]
240
			argument list	::= argument[, argument list ]
241
			argument		::= expression
241
			argument		::= expression
242
	 */
242
	 */
243
	std::string	symbol;
243
	std::string	symbol;
244
	TokenId		token = TOKENID_INVALID;
244
	TokenId		token = TOKENID_INVALID;
245
	while ( readExpression( is, symbol, token, evaluationContext.getSymbolTable() ) )
245
	while ( readExpression( is, symbol, token, evaluationContext ) )
246
	{
246
	{
247
		switch ( token )
247
		switch ( token )
248
		{
248
		{
249
		case TOKENID_FUNCTION:
249
		case TOKENID_FUNCTION:
250
			return ( evaluateFunction( is, value, symbol, sideEffect, evaluationContext, path, postponed ) );
250
			return ( evaluateFunction( is, value, symbol, sideEffect, evaluationContext, path, postponed ) );
Line 528... Line 528...
528
//## Operation: evaluateVariable%420AE22101D7
528
//## Operation: evaluateVariable%420AE22101D7
529
const bool FieldExpression::evaluateVariable (std::istream &is, std::string &value, std::string &symbol, const bool &sideEffect, EvaluationContext& evaluationContext, std::vector< DefinedVariable * > &path, bool &postponed)
529
const bool FieldExpression::evaluateVariable (std::istream &is, std::string &value, std::string &symbol, const bool &sideEffect, EvaluationContext& evaluationContext, std::vector< DefinedVariable * > &path, bool &postponed)
530
{
530
{
531
  //## begin FieldExpression::evaluateVariable%420AE22101D7.body preserve=yes
531
  //## begin FieldExpression::evaluateVariable%420AE22101D7.body preserve=yes
532
 
532
 
533
	return ( evaluationContext.getSymbolTable().getDefinedVariable( symbol ).
533
	return ( evaluationContext.getSymbolTable().getVariable( symbol, evaluationContext ).
534
				evaluate( value, sideEffect, evaluationContext, path, postponed ) );
534
				evaluate( value, sideEffect, evaluationContext, path, postponed ) );
535
 
535
 
536
  //## end FieldExpression::evaluateVariable%420AE22101D7.body
536
  //## end FieldExpression::evaluateVariable%420AE22101D7.body
537
}
537
}
538
 
538