File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 4141using System . IO ;
4242using System . Linq ;
4343using System . Reflection ;
44-
44+ using System . Runtime . InteropServices ;
4545using Antlr4 . Runtime ;
4646
4747using JetBrains . Annotations ;
@@ -245,9 +245,9 @@ public IEnumerable<string> GetParserRulesForGrammarParser([NotNull] Type parserT
245245 {
246246 if ( parserType is null ) throw new ArgumentNullException ( nameof ( parserType ) ) ;
247247
248- var methods = parserType . GetMethods ( )
249- . Where ( m => m . GetCustomAttributes ( typeof ( RuleVersionAttribute ) , false ) . Length > 0 ) ;
250- return from method in methods select method . Name ;
248+ var prop = parserType . GetField ( "ruleNames" , BindingFlags . Public | BindingFlags . Static ) ;
249+ var value = prop . GetValue ( null ) as string [ ] ;
250+ return value ;
251251 }
252252
253253 private List < GrammarReference > FindGrammars ( [ NotNull ] string path , string name = null )
You can’t perform that action at this time.
0 commit comments