zompinc / sync-method-generator

Generates a synchronized version of an async method
MIT License
48 stars 4 forks source link

Handle directive inside a statement #85

Open virzak opened 2 months ago

virzak commented 2 months ago

Handle directive inside statements aren't handled properly. First mentioned in #83

        [Zomp.SyncMethodGenerator.CreateSyncVersion(OmitNullableDirective = true)]
        public async Task FooAsync()
        {
            await Task.Delay(100);

            var bar =
#if DEBUG
                true;
#else
                false;
#endif
        }