Storyyeller / Krakatau

Java decompiler, assembler, and disassembler
GNU General Public License v3.0
1.95k stars 220 forks source link

assembler does not support negative cases in lookupswitch #93

Closed skochinsky closed 8 years ago

skochinsky commented 8 years ago

The following code produces assembler error:

         lookupswitch
                  -2: LABEL_016A
                  -1: LABEL_0160
                    default: LABEL_0178
jeff_core10.j:12987:19: error: Invalid token. Did you mean to use quotes?
                  -2: LABEL_016A
                  ^~~            
skochinsky commented 8 years ago

Oh, apparently I need to have a space before the colon.

Storyyeller commented 7 years ago

Note that the v1 syntax always requires whitespace between tokens. However, when I was working on the v1 assembler, I discovered that there was some existing code that didn't have a space before the colon, so I created an undocumented special case in the parser to avoid breaking code. But it seems that this just leads to confusion, so I plan to remove that and unconditionally require a space, as documented.