deps/v8/src/parser.cc
Handle<String> Parser::ParseIdentifierOrGetOrSet(bool* is_get,
                                                 bool* is_set,
                                                 bool* ok) {
  Expect(Token::IDENTIFIER, ok);
  if (!*ok) return Handle<String>();
  if (scanner_.literal_length() == 3) {
    const char* token = scanner_.literal_string();
    *is_get = strcmp(token, "get") == 0;
    *is_set = !*is_get && strcmp(token, "set") == 0;
  }
  return GetSymbol(ok);
}
// This function reads an identifier and determines whether or not it
// is 'get' or 'set'.  The reason for not using ParseIdentifier and
// checking on the output is that this involves heap allocation which
// we can't do during preparsing.
This function reads an identifier and determines whether or not it
is 'get' or 'set'.  The reason for not using ParseIdentifier and
checking on the output is that this involves heap allocation which
we can't do during preparsing.
This function reads an identifier and determines whether or not it is ' get ' or ' set ' . The reason for not using ParseIdentifier and checking on the output is that this involves heap allocation which we can ' t do during preparsing .
Handle<String> Parser::ParseIdentifierOrGetOrSet(bool* is_get,
                                                 bool* is_set,
                                                 bool* ok) {
  Expect(Token::IDENTIFIER, ok);
  if (!*ok) return Handle<String>();
  if (scanner_.literal_length() == 3) {
    const char* token = scanner_.literal_string();
    *is_get = strcmp(token, "get") == 0;
    *is_set = !*is_get && strcmp(token, "set") == 0;
  }
  return GetSymbol(ok);
}
Handle < String > Parser :: ParseIdentifierOrGetOrSet ( bool * is_get , bool * is_set , bool * ok ) { Expect ( Token :: IDENTIFIER , ok ) ; if ( ! * ok ) return Handle < String > ( ) ; if ( scanner_ . literal_length ( ) == 3 ) { const char * token = scanner_ . literal_string ( ) ; * is_get = strcmp ( token , " " ) == 0 ; * is_set = ! * is_get && strcmp ( token , " " ) == 0 ; } return GetSymbol ( ok ) ; }
This function reads an identifier and determines whether or not it
is 'get' or 'set'.
This function reads an identifier and determines whether or not it is ' get ' or ' set ' .