Closed JPeer264 closed 6 years ago
Hey @JPeer264 - thanks for reporting this issue!
I'll attach a proposal for the validation test case below - could you confirm that it matches your expected result? :-)
it('can skip if clauses without brackets', function() {
var dsl = multiline.stripIndent(function() {/*
myVar1 "a"
if (myBreakfast === "eggs") myVar2 "b"
myVar2 "c"
*/ });
var expected = {
myVar1: 'a',
myVar2: 'c'
};
return parser.parseText(dsl).then(function(parsedValue) {
expect(parsedValue).to.deep.equal(expected);
});
});
Furthermore, do we have to account for the following syntax as well?
myVar1 "a"
if (myBreakfast === "eggs")
myVar2 "b"
myVar2 "c"
could you confirm that it matches your expected result?
Sure that is just as expected
Furthermore, do we have to account for the following syntax as well?
Hm, in my case it is not necessary, but would be neat for having that (don't know how difficult this case would be to implement).
I'll hopefully have time to look at this during the weekend, @JPeer264. :-)
Ya no hurry 👍
Hey @JPeer264, I finally had time to wrap this one up. Could you give #12 a look when you have some spare time on your hands?
gradle-to-js version 1.1.0 should now be available on NPM, and once again - thanks for reporting this issue!
When I have
if
statements without any brackets it won't work as expected:It needs to renamed with brackets to work: