File tree Expand file tree Collapse file tree 3 files changed +99
-4
lines changed Expand file tree Collapse file tree 3 files changed +99
-4
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ module.exports = {
36
36
case "+" :
37
37
case "*" :
38
38
case "%" :
39
+ case "~" :
40
+ case "<" :
41
+ case ">" :
39
42
return this . consume_TOKEN ( ) ;
40
43
case "[" :
41
44
listDepth ++ ;
Original file line number Diff line number Diff line change @@ -869,7 +869,7 @@ Program {
869
869
},
870
870
" what" : Name {
871
871
" kind" : " name" ,
872
- " name" : " Att2 " ,
872
+ " name" : " Att3 " ,
873
873
" resolution" : " uqn" ,
874
874
},
875
875
},
@@ -881,15 +881,104 @@ Program {
881
881
},
882
882
" what" : Name {
883
883
" kind" : " name" ,
884
- " name" : " Att2 " ,
884
+ " name" : " Att3 " ,
885
885
" resolution" : " uqn" ,
886
886
},
887
887
},
888
888
" type" : " ^" ,
889
889
},
890
890
],
891
891
" kind" : " attribute" ,
892
- " name" : " Att2" ,
892
+ " name" : " Att3" ,
893
+ },
894
+ ],
895
+ " kind" : " attrgroup" ,
896
+ },
897
+ AttrGroup {
898
+ " attrs" : Array [
899
+ Attribute {
900
+ " args" : Array [
901
+ Unary {
902
+ " kind" : " unary" ,
903
+ " type" : " ~" ,
904
+ " what" : StaticLookup {
905
+ " kind" : " staticlookup" ,
906
+ " offset" : Identifier {
907
+ " kind" : " identifier" ,
908
+ " name" : " BAR" ,
909
+ },
910
+ " what" : Name {
911
+ " kind" : " name" ,
912
+ " name" : " Att4" ,
913
+ " resolution" : " uqn" ,
914
+ },
915
+ },
916
+ },
917
+ ],
918
+ " kind" : " attribute" ,
919
+ " name" : " Att4" ,
920
+ },
921
+ ],
922
+ " kind" : " attrgroup" ,
923
+ },
924
+ AttrGroup {
925
+ " attrs" : Array [
926
+ Attribute {
927
+ " args" : Array [
928
+ Bin {
929
+ " kind" : " bin" ,
930
+ " left" : StaticLookup {
931
+ " kind" : " staticlookup" ,
932
+ " offset" : Identifier {
933
+ " kind" : " identifier" ,
934
+ " name" : " BAR" ,
935
+ },
936
+ " what" : Name {
937
+ " kind" : " name" ,
938
+ " name" : " Att5" ,
939
+ " resolution" : " uqn" ,
940
+ },
941
+ },
942
+ " right" : Number {
943
+ " kind" : " number" ,
944
+ " value" : " 1" ,
945
+ },
946
+ " type" : " >>" ,
947
+ },
948
+ ],
949
+ " kind" : " attribute" ,
950
+ " name" : " Att5" ,
951
+ },
952
+ ],
953
+ " kind" : " attrgroup" ,
954
+ },
955
+ AttrGroup {
956
+ " attrs" : Array [
957
+ Attribute {
958
+ " args" : Array [
959
+ Bin {
960
+ " kind" : " bin" ,
961
+ " left" : StaticLookup {
962
+ " kind" : " staticlookup" ,
963
+ " offset" : Identifier {
964
+ " kind" : " identifier" ,
965
+ " name" : " BAR" ,
966
+ },
967
+ " what" : Name {
968
+ " kind" : " name" ,
969
+ " name" : " Att6" ,
970
+ " resolution" : " uqn" ,
971
+ },
972
+ },
973
+ " right" : Number {
974
+ " kind" : " number" ,
975
+ " value" : " 1" ,
976
+ },
977
+ " type" : " <<" ,
978
+ },
979
+ ],
980
+ " kind" : " attribute" ,
981
+ " name" : " Att6" ,
893
982
},
894
983
],
895
984
" kind" : " attrgroup" ,
Original file line number Diff line number Diff line change @@ -82,7 +82,10 @@ describe("Parse Attributes", () => {
82
82
`
83
83
#[Att1(Att1::FOO | Att1::BAR)]
84
84
#[Att2(Att2::FOO & Att2::BAR)]
85
- #[Att2(Att2::FOO ^ Att2::BAR)]
85
+ #[Att3(Att3::FOO ^ Att3::BAR)]
86
+ #[Att4(~ Att4::BAR)]
87
+ #[Att5(Att5::BAR >> 1)]
88
+ #[Att6(Att6::BAR << 1)]
86
89
class A {}
87
90
` ,
88
91
{ parser : { extractDoc : true } }
You can’t perform that action at this time.
0 commit comments