Skip to content

Commit

Permalink
Merge pull request #1107 from dpvc/context-units
Browse files Browse the repository at this point in the history
Add new contextUnits.pl implementing units as true MathObject classes
  • Loading branch information
drgrice1 authored Dec 3, 2024
2 parents ffff523 + 6dcc4c3 commit 14dc056
Show file tree
Hide file tree
Showing 2 changed files with 2,088 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Value.pm
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,9 @@ sub matchNumber { my $n = shift; $n =~ m/^$$Value::context->{pattern}{signedNu
sub matchInfinite { my $n = shift; $n =~ m/^$$Value::context->{pattern}{infinite}$/i }
sub isReal { classMatch(shift, 'Real') }
sub isComplex { classMatch(shift, 'Complex') }
# sub isContext {class(shift) eq 'Context'} # MEG
sub isContext { my $symbol = shift || ""; class($symbol) eq 'Context' }
sub isFormula { classMatch(shift, 'Formula') }
sub isParser { my $v = shift; isBlessed($v) && $v->isa('Parser::Item') }
sub isContext { class(shift // '') eq 'Context' }
sub isFormula { classMatch(shift, 'Formula') }
sub isParser { my $v = shift; isBlessed($v) && $v->isa('Parser::Item') }

sub isValue {
my $v = shift // '';
Expand Down
Loading

0 comments on commit 14dc056

Please sign in to comment.