cli: Refactor handling of negative numbers
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 22 Apr 2019 14:41:39 +0000 (10:41 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 May 2019 04:12:55 +0000 (00:12 -0400)
This patch breaks out the code that reads a number just after having
read the minus sign introducing a negative number.

Instead of keeping a state in the parser, and going through a new
iteration, we call the new function which returns a bt_value directly.

This enables the following patch to do a similar change, but for the
parsing of all values (which includes the parsing of negative numbers).
In turn, this will allow parsing values recursively, which is needed to
support array values.  Orthogonally, I think the code is easier to
follow this way.

No functional changes intended.

Signed-off-by: Simon Marchi <simon.marchi@efficios.com>

No differences found
This page took 0.026149 seconds and 5 git commands to generate.