mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-12 15:02:21 +00:00
Fixed AS - direct editation - long integer values
This commit is contained in:
@@ -358,13 +358,20 @@ Preprocessor = \u00A7\u00A7 {Identifier}
|
||||
|
||||
/* numeric literals */
|
||||
|
||||
{DecIntegerLiteral} { return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Long.parseLong((yytext()))); }
|
||||
{DecIntegerLiteral} {
|
||||
try{
|
||||
return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Long.parseLong(yytext()));
|
||||
} catch(NumberFormatException nfe){
|
||||
//its too long for a Long var
|
||||
return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, Double.parseDouble(yytext()));
|
||||
}
|
||||
}
|
||||
|
||||
{HexIntegerLiteral} { return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Long.parseLong(yytext().substring(2), 16)); }
|
||||
|
||||
{OctIntegerLiteral} { return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Long.parseLong(yytext(), 8)); }
|
||||
|
||||
{DoubleLiteral} { return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, Double.parseDouble((yytext()))); }
|
||||
{DoubleLiteral} { return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, Double.parseDouble(yytext())); }
|
||||
|
||||
/* comments */
|
||||
{Comment} { yyline += count(yytext(),"\n"); }
|
||||
|
||||
Reference in New Issue
Block a user