mirror of
https://github.com/bluekitchen/btstack.git
synced 2024-12-29 09:26:08 +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
|
|
|