code: private int followVar(char[] array, int currentIndex, boolean fullSyntax, VelocityParserContext context)
      {
          int i = currentIndex;
  
          while (i < array.length) {
              if (fullSyntax && array[i] == '}') {
                  ++i;
                  break;
              } else if (array[i] == '.') {
                  try {
                      i = getMethodOrProperty(array, i, null, context);
                  } catch (InvalidVelocityException e) {
                      LOGGER.debug("Not a valid method at char [{}]", i, e);
                      break;
                  }
              } else if (array[i] == '[') {
                  i = getTableElement(array, i, null, context);
                  break;
              } else {
                  break;
              }
          }
  
          return i;
      }
docs: Get the right part of a Velocity variable (the methods and properties starting from the dot).
  
  @param array the source to parse
  @param currentIndex the current index in the <code>array</code>
  @param fullSyntax indicate if it's between <code>{</code> and <code>}</code>
  @param context the parser context to put some informations
  @return the index in the <code>array</code> after the matched block