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)
commit15dc2ca35fad5dbce99d78fe862a9c522e78e8b4
tree2b83ea203cbb9d90ee206bc8c21a09d880561afb
parent314abea1427588da05bdc841719bc38d1c806419
cli: Refactor handling of negative numbers

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>
cli/babeltrace-cfg-cli-args.c
This page took 0.024651 seconds and 5 git commands to generate.