eo icon indicating copy to clipboard operation
eo copied to clipboard

catch redundant brackets

Open yegor256 opened this issue 2 years ago • 3 comments

I suggest we create a new XSL checker for eo-parser, which will prohibit the usage of redundant brackets, for example, this code should not parse:

[] > foo
  (1.add (a.add 5) (4)) > x

This one should be expected instead:

[] > foo
  1.add (a.add 5) 4 > x

yegor256 avatar Dec 12 '21 19:12 yegor256

@andreoss what do you think?

yegor256 avatar Dec 12 '21 19:12 yegor256

@yegor256 Please, assign to me. Are you positive that it should be XSL? It seems that it would be easier to count and discard extra parenthesis in XeListener.

andreoss avatar Dec 12 '21 22:12 andreoss

@andreoss I'm not sure about XSL. I actually don't know how this can be implemented at all :) You go ahead.

yegor256 avatar Dec 13 '21 04:12 yegor256

@volodya-lombrozo try this one please

yegor256 avatar Nov 13 '22 04:11 yegor256

@yegor256 the puzzle #1490 is still not solved.

0pdd avatar Nov 25 '22 08:11 0pdd

@yegor256 the only puzzle #1490 is solved here.

0pdd avatar Feb 15 '23 10:02 0pdd