[system] / trunk / pg / lib / Parser.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Parser.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2609 Revision 2611
630 my $variables = $self->{context}{variables}; 630 my $variables = $self->{context}{variables};
631 $self->{values} = {@_}; 631 $self->{values} = {@_};
632 foreach my $x (keys %{$self->{values}}) { 632 foreach my $x (keys %{$self->{values}}) {
633 $self->Error("Undeclared variable '$x'") unless defined $variables->{$x}; 633 $self->Error("Undeclared variable '$x'") unless defined $variables->{$x};
634 $value = Value::makeValue($self->{values}{$x}); 634 $value = Value::makeValue($self->{values}{$x});
635 $value = Value::Formula->new($value) unless
636 Value::isFormula($value) || Value::isValue($value);
635 if (Value::isFormula($value)) {$type = $value->typeRef} 637 if (Value::isFormula($value)) {$type = $value->typeRef}
636 else {($value,$type) = Value::getValueType($self,$value)} 638 else {($value,$type) = Value::getValueType($self,$value)}
637 $self->Error("Variable '$x' should be of type $variables->{$x}{type}{name}") 639 $self->Error("Variable '$x' should be of type $variables->{$x}{type}{name}")
638 unless Parser::Item::typeMatch($type,$variables->{$x}{type}); 640 unless Parser::Item::typeMatch($type,$variables->{$x}{type});
639 $self->{values}{$x} = $value; 641 $self->{values}{$x} = $value;

Legend:
Removed from v.2609  
changed lines
  Added in v.2611

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9