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

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

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

Revision 2644 Revision 2645
22# 22#
23sub _eval { 23sub _eval {
24 my $self = shift; my ($a,$b) = @_; 24 my $self = shift; my ($a,$b) = @_;
25 $a = Value::makeValue($a) unless ref($a); 25 $a = Value::makeValue($a) unless ref($a);
26 $b = Value::makeValue($b) unless ref($b); 26 $b = Value::makeValue($b) unless ref($b);
27 $a == $b; 27 return ($a == $b)? 1 : 0;
28} 28}
29 29
30# 30#
31# Add/Remove the equality operator to/from a context 31# Add/Remove the equality operator to/from a context
32# 32#
40 '=' => { 40 '=' => {
41 class => 'Parser::BOP::equality', 41 class => 'Parser::BOP::equality',
42 precedence => $prec+.25, # just above comma 42 precedence => $prec+.25, # just above comma
43 associativity => 'left', # computed left to right 43 associativity => 'left', # computed left to right
44 type => 'bin', # binary operator 44 type => 'bin', # binary operator
45 string => '=', # output string for it 45 string => ' = ', # output string for it
46 perl => '==', # perl string 46 perl => '==', # perl string
47 } 47 }
48 ); 48 );
49 } else {$context->operators->remove('=')} 49 } else {$context->operators->remove('=')}
50 return; 50 return;

Legend:
Removed from v.2644  
changed lines
  Added in v.2645

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9