]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
codeparser: Add support for correct linenumbers
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Jan 2016 17:31:19 +0000 (17:31 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 5 Jan 2016 14:06:27 +0000 (14:06 +0000)
commit5796ed550d127853808f38257f8dcc8c1cf59342
tree5a30db899f20afcbd7cd118d725516ecc49dc8a6
parent98d7002d1dca4b62042e1589fd5b9b3805d57f7a
codeparser: Add support for correct linenumbers

Currently, if there is something like a python indentation error in a
python function, the linenumbers and even file aren't reported correctly.

This allows lineno and filename parameters to be passed in to correct this.

The lack of a lineno parameter to python's compile() function is worked
around by using empty linefeeds. Ugly, but effective and with minimal
performance overhead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/codeparser.py