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
|
``-v, --verbose`` option
|
||||||
(`issue #721 <https://github.com/platformio/platformio/issues/721>`_)
|
(`issue #721 <https://github.com/platformio/platformio/issues/721>`_)
|
||||||
* Improved INO to CPP converter
|
* 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>`__
|
* Added ``license`` field to `library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`__
|
||||||
(`issue #522 <https://github.com/platformio/platformio/issues/522>`_)
|
(`issue #522 <https://github.com/platformio/platformio/issues/522>`_)
|
||||||
* Warn about unknown options in project configuration file ``platformio.ini``
|
* Warn about unknown options in project configuration file ``platformio.ini``
|
||||||
|
@ -31,7 +31,7 @@ from platformio import util
|
|||||||
class InoToCPPConverter(object):
|
class InoToCPPConverter(object):
|
||||||
|
|
||||||
PROTOTYPE_RE = re.compile(r"""^(
|
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
|
(\s+[a-z_\d]+\s*) # name of prototype
|
||||||
\([a-z_,\.\*\&\[\]\s\d]*\) # arguments
|
\([a-z_,\.\*\&\[\]\s\d]*\) # arguments
|
||||||
)\s*\{ # must end with {
|
)\s*\{ # must end with {
|
||||||
|
@ -9,9 +9,13 @@ struct Item {
|
|||||||
class Foo {
|
class Foo {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Foo(void (*function)()) {
|
Foo(void (*function)()) {
|
||||||
#warning "Line number is 13"
|
#warning "Line number is 13"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool childFunc() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,5 +40,5 @@ def test_warning_line(clirunner, validate_cliresult):
|
|||||||
result = clirunner.invoke(cmd_ci,
|
result = clirunner.invoke(cmd_ci,
|
||||||
[join(INOTEST_DIR, "basic"), "-b", "uno"])
|
[join(INOTEST_DIR, "basic"), "-b", "uno"])
|
||||||
validate_cliresult(result)
|
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)
|
result.output)
|
||||||
|
Reference in New Issue
Block a user