File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -1653,7 +1653,9 @@ grammar P6 is STD {
1653
1653
token scope_declarator :has {
1654
1654
<sym > {
1655
1655
given $ * PKGDECL {
1656
- when ' class' | ' grammar' | ' role' {}
1656
+ when ' class' {} # XXX to be replaced by MOP queries
1657
+ when ' grammar' {}
1658
+ when ' role' {}
1657
1659
default { $¢. worry(" 'has' declaration outside of class" ) }
1658
1660
}
1659
1661
}
@@ -1876,7 +1878,9 @@ grammar P6 is STD {
1876
1878
:my $ * DECLARAND ;
1877
1879
{
1878
1880
given $ * PKGDECL {
1879
- when ' class' | ' grammar' | ' role' {}
1881
+ when ' class' {} # XXX to be replaced by MOP queries
1882
+ when ' grammar' {}
1883
+ when ' role' {}
1880
1884
default {$¢. worry(" '$ d ' declaration outside of class" ) unless $ * SCOPE }
1881
1885
}
1882
1886
}
@@ -1911,7 +1915,8 @@ grammar P6 is STD {
1911
1915
:my $ * DECLARAND ;
1912
1916
{
1913
1917
given $ * PKGDECL {
1914
- when ' grammar' | ' role' {}
1918
+ when ' grammar' {} # XXX to be replaced by MOP queries
1919
+ when ' role' {}
1915
1920
default { $¢. worry(" '$ d ' declaration outside of grammar" ) unless $ * SCOPE }
1916
1921
}
1917
1922
}
@@ -5852,14 +5857,15 @@ method check_variable ($variable) {
5852
5857
}
5853
5858
}
5854
5859
when ' !' {
5855
- given $ * SCOPE {
5856
- when ' method' | ' submethod' {}
5860
+ given $ * CURLEX . <!IN_DECL >// ' ' {
5861
+ when ' method' {} # XXX to be replaced by MOP queries
5862
+ when ' submethod' {}
5857
5863
default { $ variable . worry(" Variable $ name used outside of method/submethod declaration" ); }
5858
5864
}
5859
5865
}
5860
5866
when ' .' {
5861
- given $ * SCOPE {
5862
- when ' method' {}
5867
+ given $ * CURLEX . < !IN_DECL > // ' ' {
5868
+ when ' method' {} # XXX to be replaced by MOP queries
5863
5869
default { $ variable . worry(" Variable $ name used outside of method declaration" ); }
5864
5870
}
5865
5871
}
You can’t perform that action at this time.
0 commit comments