diff --git a/pkg/service/features/app.feature b/pkg/service/features/app.feature index c37bb99..47776ac 100644 --- a/pkg/service/features/app.feature +++ b/pkg/service/features/app.feature @@ -550,6 +550,14 @@ void loop() {} ``` package test +type device struct { +} +func (d *device) doSomething() { + a := "" + a += fmt.Sprint(5) + a += "A " + fmt.Sprint(19) + " A " + fmt.Sprint(a) +} + func Setup() { a := "" a += fmt.Sprint(5) @@ -558,7 +566,17 @@ func Setup() { ``` * Результат: ``` +class device { +public: + void doSomething(); +}; void setup(); +void device::doSomething() { +std::string a=""; +a+=std::to_string(5); +a+="A "+std::to_string(19)+" A "+std::to_string(a); +} + void setup() { std::string a=""; a+=std::to_string(5); diff --git a/pkg/service/mapping.go b/pkg/service/mapping.go index ba3479e..e63726d 100644 --- a/pkg/service/mapping.go +++ b/pkg/service/mapping.go @@ -2,6 +2,7 @@ package service var mapping = map[string]string{ "fmt.Sprint": "std::to_string", + "fmt->Sprint": "std::to_string", "digital.Low": "LOW", "digital.High": "HIGH", "digital.ModeInput": "INPUT",