forked from platformio/platformio-core
Improve INO to CPP converter // Resolve #659
This commit is contained in:
@ -74,6 +74,7 @@ PlatformIO 3.0
|
||||
``-v, --verbose`` option
|
||||
(`issue #721 <https://github.com/platformio/platformio/issues/721>`_)
|
||||
* Improved INO to CPP converter
|
||||
(`issue #659 <https://github.com/platformio/platformio/issues/659>`_)
|
||||
* Added ``license`` field to `library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`__
|
||||
(`issue #522 <https://github.com/platformio/platformio/issues/522>`_)
|
||||
* Warn about unknown options in project configuration file ``platformio.ini``
|
||||
|
@ -31,7 +31,7 @@ from platformio import util
|
||||
class InoToCPPConverter(object):
|
||||
|
||||
PROTOTYPE_RE = re.compile(r"""^(
|
||||
(\s*[a-z_\d]+\*?){1,2} # return type
|
||||
([a-z_\d]+\*?){1,2} # return type
|
||||
(\s+[a-z_\d]+\s*) # name of prototype
|
||||
\([a-z_,\.\*\&\[\]\s\d]*\) # arguments
|
||||
)\s*\{ # must end with {
|
||||
|
@ -13,6 +13,10 @@ class Foo {
|
||||
#warning "Line number is 13"
|
||||
}
|
||||
|
||||
bool childFunc() {
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Foo foo(&fooCallback);
|
||||
|
@ -40,5 +40,5 @@ def test_warning_line(clirunner, validate_cliresult):
|
||||
result = clirunner.invoke(cmd_ci,
|
||||
[join(INOTEST_DIR, "basic"), "-b", "uno"])
|
||||
validate_cliresult(result)
|
||||
assert ('basic.ino:13:4: warning: #warning "Line number is 13"' in
|
||||
assert ('basic.ino:13:14: warning: #warning "Line number is 13"' in
|
||||
result.output)
|
||||
|
Reference in New Issue
Block a user