yast/yast-core — pull request #41 by dmajda (2013-08-07 07:21:23+00:00)
Title: Do not lose comments before negative numbers in YCP parser

When YCP parser encounters unary minus followed by an integer or float,
it performs the negation in parse time already, optimizing the AST and
resulting bytecode a bit.

Before this commit, the optimizing code didn't transfer comments
encountered before the "-" sign to the created AST node (YConst
instance). This was a bug, which affected YCP to Ruby translation done
by YCP Killer. This commit fixes this bug by adding two "RULE_COMMENT"
macro invocations at appropriate places.

Fixes https://github.com/yast/ycp-killer/issues/617.