@@ -49,9 +49,15 @@ enum ErrorKind {
49
49
#[ error( "expected {0}, found {1}" ) ]
50
50
#[ diagnostic( code( "Qsc.Parse.Token" ) ) ]
51
51
Token ( TokenKind , TokenKind , #[ label] Span ) ,
52
+ #[ error( "expected item after attribute" ) ]
53
+ #[ diagnostic( code( "Qsc.Parse.FloatingAttr" ) ) ]
54
+ FloatingAttr ( #[ label] Span ) ,
52
55
#[ error( "expected item after doc comment" ) ]
53
56
#[ diagnostic( code( "Qsc.Parse.FloatingDocComment" ) ) ]
54
57
FloatingDocComment ( #[ label] Span ) ,
58
+ #[ error( "expected item after visibility modifier" ) ]
59
+ #[ diagnostic( code( "Qsc.Parse.FloatingVisibility" ) ) ]
60
+ FloatingVisibility ( #[ label] Span ) ,
55
61
#[ error( "expected {0}, found {1}" ) ]
56
62
#[ diagnostic( code( "Qsc.Parse.Rule" ) ) ]
57
63
Rule ( & ' static str , TokenKind , #[ label] Span ) ,
@@ -78,6 +84,8 @@ impl ErrorKind {
78
84
Self :: MissingSemi ( span) => Self :: MissingSemi ( span + offset) ,
79
85
Self :: MissingParens ( span) => Self :: MissingParens ( span + offset) ,
80
86
Self :: FloatingDocComment ( span) => Self :: FloatingDocComment ( span + offset) ,
87
+ Self :: FloatingAttr ( span) => Self :: FloatingAttr ( span + offset) ,
88
+ Self :: FloatingVisibility ( span) => Self :: FloatingVisibility ( span + offset) ,
81
89
}
82
90
}
83
91
}
0 commit comments