question: public static final VariableContext [ ] parse ( String variable ) { char [ ] text = variable . toCharArray ( ) ; List < VariableContext > contexts = new ArrayList < > ( ) ; int i = addMember ( text , 0 , contexts ) ; while ( i < text . length ) { if ( text [ i ] == '[' ) { if ( text [ ++ i ] == '\'' ) { i = addStringIndex ( text , i , contexts ) ; } else { i = addIntIndex ( text , i , contexts ) ; } ++ i ; } else { i = addMember ( text , i + 1 , contexts ) ; } } return contexts . toArray ( new VariableContext [ contexts . size ( ) ] ) ; }
target:  Parses a normalized javascript variable. All strings in the variable should be single quoted, and no spaces (except possibly within strings).