svoid tok_numberFunctionNames(...) { int n = ...; ... reToks; for (int i = 1; i < n-2; i += 2) { S number, id; if (isInteger(number = tok.get(i)) && empty(tok.get(i+1)) && isIdentifier(id = tok.get(i+2))) pcall { replaceTokens_reTokLater(..., i, i+3, camelCase(numberToEnglish(parseLong(number))) + firstToUpper(id)); } } reTok_multi(...); }
Began life as a copy of #1031769
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031772 |
Snippet name: | tok_numberFunctionNames (e.g. "1to" => "oneTo") - possible shortening with ellipses |
Eternal ID of this version: | #1031772/2 |
Text MD5: | c78f9190f23522391499c3a11af05873 |
Author: | stefan |
Category: | javax / transpiling |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-29 15:05:18 |
Source code size: | 379 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 124 / 149 |
Version history: | 1 change(s) |
Referenced in: | [show references] |