@Override
    public Void visitIntegerLiteral(final GremlinParser.IntegerLiteralContext ctx) {
        final String integerLiteral = ctx.getText().toLowerCase();

        // check suffix
        final int lastCharIndex = integerLiteral.length() - 1;
        final char lastCharacter = integerLiteral.charAt(lastCharIndex);
        switch (lastCharacter) {
            case 'b':
                // parse B/b as byte
                sb.append("(byte)");
                sb.append(integerLiteral, 0, lastCharIndex);
                break;
            case 's':
                // parse S/s as short
                sb.append("(short)");
                sb.append(integerLiteral, 0, lastCharIndex);
                break;
            case 'n':
                // parse N/n as BigInteger which for groovy is "g" shorthand
                sb.append(integerLiteral, 0, lastCharIndex).append("g");
                break;
            default:
                // covers I/i and L/l as Integer and Long respectively
                // everything else just goes as specified
                sb.append(integerLiteral);
                break;
        }
        return null;
    }
Converts a Gremlin traversal string into a Groovy source code representation of that traversal with an aim at
sacrificing some formatting for the ability to compile correctly. The translations may require use of TinkerPop's
sugar syntax and therefore requires use of the {@code GremlinLoader} in the gremlin-groovy module unless you are
specifically certain that your translations will not result in the use of that syntax. If in doubt, prefer the
{@link JavaTranslateVisitor} instead.
<ul>
    <li>Normalize numeric suffixes to lower case</li>
    <li>If floats are not suffixed they will translate as BigDecimal</li>
    <li>Makes anonymous traversals explicit with double underscore</li>
    <li>Makes enums explicit with their proper name</li>
</ul>
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GroovyTranslateVisitor.java