Skip to content

Commit

Permalink
Merge pull request #218 from Martin521/master
Browse files Browse the repository at this point in the history
Additional #nowarn directives in the generated code
  • Loading branch information
nojaf authored Sep 3, 2024
2 parents fdc0974 + 7c2c3b1 commit e150dd3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/FsYacc.Core/fsyaccdriver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ let writeSpecToFile (generatorState: GeneratorState) (spec: ParserSpec) (compile
writer.WriteLine
"#nowarn \"64\";; // turn off warnings that type variables used in production annotations are instantiated to concrete type"

writer.WriteLine "#nowarn \"1182\" // the generated code often has unused variable 'parseState'"

writer.WriteLine
"#nowarn \"3261\" // the generated code would need to properly annotate nulls, e.g. changing System.Object to `obj|null`"

for s in generatorState.opens do
writer.WriteLine "open %s" s
writer.WriteLineInterface "open %s" s
Expand Down

0 comments on commit e150dd3

Please sign in to comment.