You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The intent of the following code is that every other number than 0 or 2 will trigger the default condition, and every default condition will also trigger 2. However, the switch statement pulls that attribute out and this results in loss of information which results in the code not being correctly regenerated (i.e. the default is the last to be printed, instead of being printed before case 2: case statements).
The text was updated successfully, but these errors were encountered:
metatoaster
changed the title
Switch default statement location not preserved
Switch default statement position not preserved
Jun 22, 2017
metatoaster
changed the title
Switch default statement position not preserved
Switch default statement position not preserved (it is not always the last statement)
Jun 22, 2017
metatoaster
added a commit
to metatoaster/calmjs.parse
that referenced
this issue
Jun 22, 2017
- Only doing this on the sourcemap/pprint compatible layout due to the
amount of work that will need to be done to make the previous string
based visitors work again (mostly the testing).
- Yes, existing API is now verified to be broken in this one way.
- Now more conformant to the grammar as specified in ECMA-262 12.11.
- Fixesrspivak/slimit#94
metatoaster
added a commit
to metatoaster/calmjs.parse
that referenced
this issue
Jun 22, 2017
- Only doing this on the sourcemap/pprint compatible layout due to the
amount of work that will need to be done to make the previous string
based visitors work again (mostly the testing).
- Yes, existing API is now verified to be broken in this one way.
- Now more conformant to the grammar as specified in ECMA-262 12.11.
- Fixesrspivak/slimit#94
The intent of the following code is that every other number than 0 or 2 will trigger the default condition, and every default condition will also trigger 2. However, the switch statement pulls that attribute out and this results in loss of information which results in the code not being correctly regenerated (i.e. the default is the last to be printed, instead of being printed before
case 2:
case statements).The text was updated successfully, but these errors were encountered: