Questions tagged [code-transformation]
The code-transformation tag has no usage guidance.
code-transformation
7
questions
0
votes
1
answer
60
views
Renaming Function Parameters with Babel Without Changing Other Identical Identifiers
I'm working on a JavaScript project where I need to be able to programmatically rename function parameters. The specific challenge I'm facing is differentiating between function parameters and other ...
0
votes
1
answer
107
views
Trying to get generic sed multi-line pattern match and substitution script to work
There is a generic approach to solving the problem presented by this poster which is presented on linuxtopia here, in section 4.23.3 . It appears to offer a method for handling any complex content ...
-3
votes
1
answer
6k
views
is there any way to convert this python code into php [closed]
what i need to accomplish is to reach a way in which i can convert the basics on any python code into php functions and conditions and so on
def BitmapHoles(strArr):
bitmap = {}
for i in ...
1
vote
0
answers
122
views
Do-expression expansion in Haskell [duplicate]
I have a fragment of code from the Get Programming with Haskell book which looks as follows:
listToSTUArray :: [Int] -> ST s (STUArray s Int Int)
listToSTUArray vals = do
let end = length vals ...
4
votes
0
answers
77
views
Track line number changes in JavaParser
I currently try to use JavaParser to slightly modify existing source code. I now would like to able to track line number changes introduced by theses modifications.
As an example, assume that we have ...
5
votes
0
answers
591
views
How to add a new statement on the same line using JavaParser
I know that JavaParser operates on the AST, yet I was curious if it was possible to add new statements on the same line as another one.
Let me give an example on what I would like to achieve.
Example ...
2
votes
1
answer
678
views
How are expressions allowed inside Haskell do blocks
In the following code, line 4, I have an expression sandwiched between two IO actions in a do block:
1 doubleX :: (Show x, Num x) => x -> IO () ...