@Override
  public void exitExtensions(final ExtensionsContext ctx) {
    final Integer extensionStart = Integer.decode(ctx.fieldNumber().getText());
    final ExtensionRangeEndContext extensionRangeEnd = ctx.extensionRangeEnd();
    final Integer extensionEnd;

    if (extensionRangeEnd == null) {
      extensionEnd = extensionStart;
    } else {
      final FieldNumberContext fieldNumber = extensionRangeEnd.fieldNumber();
      extensionEnd = fieldNumber == null ? MAX_FIELD_NUMBER : Integer.decode(fieldNumber.getText());
    }

    scopes.addExtensionRange(extensionStart, extensionEnd, ctx);
  }
@ Override public void exitExtensions ( final ExtensionsContext ctx ) { final Integer extensionStart = Integer . decode ( ctx . fieldNumber ( ) . getText ( ) ) ; final ExtensionRangeEndContext extensionRangeEnd = ctx . extensionRangeEnd ( ) ; final Integer extensionEnd ; if ( extensionRangeEnd == null ) { extensionEnd = extensionStart ; } else { final FieldNumberContext fieldNumber = extensionRangeEnd . fieldNumber ( ) ; extensionEnd = fieldNumber == null ? MAX_FIELD_NUMBER : Integer . decode ( fieldNumber . getText ( ) ) ; } scopes . addExtensionRange ( extensionStart , extensionEnd , ctx ) ; }
Extensions