mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 09:08:06 +00:00
26 lines
338 B
Plaintext
26 lines
338 B
Plaintext
|
//
|
||
|
// append 'u' suffix to decimal or hexadecimal constants
|
||
|
//
|
||
|
|
||
|
@r1@
|
||
|
// match decimal or hexadecimal constant without suffix 'u'
|
||
|
constant C =~ "^[(0x)0-9a-fA-F]+$";
|
||
|
@@
|
||
|
C
|
||
|
|
||
|
@script:python p@
|
||
|
// define Cu := C + 'u'
|
||
|
C << r1.C;
|
||
|
Cu;
|
||
|
@@
|
||
|
coccinelle.Cu = coccinelle.C + 'u'
|
||
|
|
||
|
@@
|
||
|
// replace C with Cu
|
||
|
constant r1.C;
|
||
|
identifier p.Cu;
|
||
|
@@
|
||
|
- C
|
||
|
+ Cu
|
||
|
|