Open ghost opened 11 years ago
Technically this has no bad side effect, though it should be possible to add a new state that comments out the whole code from the global keyword the the semi-colon.
Im made simple solution https://github.com/tito100/PHP-to-Javascript/commit/b528329199f87644bbef0e9f55baa3e14a05a3b4 can you made me as commiter ? my references https://code.google.com/u/mostka.j/
Could you submit it as a pull request please - I'm not in a position to add committers at the moment.
Also, could you change the name of the state and class from 'State_SemiColon' to 'State_SkipToSemiColon' just to indicate better that the converter is skipping until it gets a semi-colon, rather than it having already reached a semi-colon.
cheers Dan
in php you must use global scope in functions for disabling syntax highligter errors
after converting to js variable name is remain.
of course, I can use /* @noinspection PhpUndefinedVariableInspection / . but it would be good to fix it