[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 2611 Revision 2628
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 $value = Value::Formula->new($value) unless Value::isValue($value);
637 if (Value::isFormula($value)) {$type = $value->typeRef}
638 else {($value,$type) = Value::getValueType($self,$value)} 636 ($value,$type) = Value::getValueType($self,$value);
639 $self->Error("Variable '$x' should be of type $variables->{$x}{type}{name}") 637 $self->Error("Variable '$x' should be of type $variables->{$x}{type}{name}")
640 unless Parser::Item::typeMatch($type,$variables->{$x}{type}); 638 unless Parser::Item::typeMatch($type,$variables->{$x}{type});
641 $self->{values}{$x} = $value; 639 $self->{values}{$x} = $value;
642 } 640 }
643} 641}

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9