yyyyyyyan / rockstar-py

Python transpiler for the esoteric language Rockstar
MIT License
94 stars 26 forks source link

function calls do not get transpiled if there is anything else on the line #6

Closed kennethgoodman closed 6 years ago

kennethgoodman commented 6 years ago

r'([A-Za-z]+(?: [A-Za-z]+)*) taking ([A-Za-z0-9_]+(?:, [A-Za-z_0-9]+)*)'

will match:

Multiply taking 3, 4

but not:

Say Multiply taking 3, 4 or anything else where a function call is mid-line.

Side point:

Multiply taking 3,4 doesn't either work

yyyyyyyan commented 6 years ago

What? Say Multiply taking 3, 4 works fine and even the fizzbuzz example uses function calls midline. I don't get the issue. What error are you getting? Will fix parameters division without space in a sec

yyyyyyyan commented 6 years ago

re.sub() is different from re.match(), so it matches even if the match is not at the beginning of the line