Skip to content

Commit b249312

Browse files
committed
Add exception X::Syntax::AddCategorial::MissingSeparator
1 parent 16122bf commit b249312

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
=begin pod
2+
3+
=TITLE class X::Syntax::AddCategorial::MissingSeparator
4+
5+
=SUBTITLE Compilation error due to defining circumfix operator without
6+
separator between opening and closing terminator
7+
8+
class X::Syntax::AddCategorial::MissingSeparator does X::Syntax { }
9+
10+
Syntax error when a circumfix operator is defined, but within the definition
11+
opening and closing terminators are not separated by a whitespace.
12+
13+
For example
14+
15+
multi sub circumfix:<βŒŠβŒ‹>($a) { return $a.floor; }
16+
17+
dies with
18+
19+
===SORRY!===
20+
Unable to identify both starter and stopper from βŒŠβŒ‹
21+
Perhaps you forgot to separate them with whitespace?
22+
23+
Valid code would contain an extra whitespace:
24+
25+
multi sub circumfix:<⌊ βŒ‹>($a) { return $a.floor; }
26+
my $n = ⌊4.9βŒ‹; ## $n is now 4
27+
28+
=end pod

β€Žtype-graph.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ class X::Syntax::Regex::Adverb does X::Syntax
386386
class X::Syntax::Regex::SolitaryQuantifier does X::Syntax
387387
class X::Syntax::Signature::InvocantMarker does X::Syntax
388388
class X::Syntax::Term::MissingInitializer does X::Syntax
389+
class X::Syntax::AddCategorial::MissingSeparator does X::Syntax
389390
class X::Syntax::Extension::Category does X::Syntax
390391
class X::Syntax::InfixInTermPosition does X::Syntax
391392
class X::Syntax::Pod::BeginWithoutIdentifier does X::Syntax does X::Pod

0 commit comments

Comments
Β (0)