JakubLinhart / SphereSharp

1 stars 3 forks source link

Return statement is added before trailing white space in @timer trigger #9

Open JakubLinhart opened 6 years ago

JakubLinhart commented 6 years ago

Currently transpiler adds default return value after comments, which seems odd:

on=@timer
call1

// here is some a comment
// here is another comment
return 0

preferred:

on=@timer
call1
return 0

// here is some a comment
// here is another comment

Tests:

        [TestMethod]
        public void Adds_return_statement_to_the_end_before_trailing_WS()
        {
            TranspileTriggerCheck(
@"on=@timer
call1

// here is some a comment
// here is another comment",
@"on=@timer
call1
return 0

// here is some a comment
// here is another comment
");
        }