diff --git a/Niecza/Actions.pm b/Niecza/Actions.pm index 42e9fcf5..77deef7f 100644 --- a/Niecza/Actions.pm +++ b/Niecza/Actions.pm @@ -157,14 +157,17 @@ sub circumfix { } sub circumfix__S_Lt_Gt { my ($cl, $M) = @_; my $sl = $M->{nibble}{_ast}; - if (!$sl->isa('Op::StringLiteral') || ($sl->text =~ /\s/)) { + if (!$sl->isa('Op::StringLiteral') || ($sl->text =~ /\S\s\S/)) { $M->sorry("Word splitting NYI"); return; } - $M->{_ast} = $sl; - $M->{qpvalue} = '<' . $sl->text . '>'; + my ($t) = $sl->text =~ /^\s*(.*?)\s*$/; + + $M->{_ast} = Op::StringLiteral->new(text => $t); + $M->{qpvalue} = '<' . $t . '>'; } +sub circumfix__S_LtLt_GtGt { goto &circumfix__S_Lt_Gt } sub infixish { my ($cl, $M) = @_; $M->sorry("Metaoperators NYI") if $M->{infix_postfix_meta_operator}[0]; diff --git a/setting b/setting index bf6c67be..2f6f0e6f 100644 --- a/setting +++ b/setting @@ -236,6 +236,30 @@ sub infix: { Q:NIL { =[0] @ unbox:Double =[1] @ unbox:Double / box:Num } } +sub infix:<< < >> { Q:NIL { + =[0] @ unbox:Double =[1] @ unbox:Double < box:Bool +} } + +sub infix:<< > >> { Q:NIL { + =[0] @ unbox:Double =[1] @ unbox:Double > box:Bool +} } + +sub infix:<< <= >> { Q:NIL { + =[0] @ unbox:Double =[1] @ unbox:Double <= box:Bool +} } + +sub infix:<< >= >> { Q:NIL { + =[0] @ unbox:Double =[1] @ unbox:Double >= box:Bool +} } + +sub infix:<< == >> { Q:NIL { + =[0] @ unbox:Double =[1] @ unbox:Double == box:Bool +} } + +sub infix:<< != >> { Q:NIL { + =[0] @ unbox:Double =[1] @ unbox:Double != box:Bool +} } + sub say { Q:NIL { =[0] dup@ .method/0:Str @ unbox:String .plaincall/1:Console.WriteLine null:Variable