src/com/google/javascript/jscomp/parsing/IRFactory.java
/**
     * Transforms the given node and then sets its type to Token.STRING if it
     * was Token.NAME. If its type was already Token.STRING, then quotes it.
     * Used for properties, as the old AST uses String tokens, while the new one
     * uses Name tokens for unquoted strings. For example, in
     * var o = {'a' : 1, b: 2};
     * the string 'a' is quoted, while the name b is turned into a string, but
     * unquoted.
     */
Transforms the given node and then sets its type to Token.STRING if it
was Token.NAME. If its type was already Token.STRING, then quotes it.
Used for properties, as the old AST uses String tokens, while the new one
uses Name tokens for unquoted strings. For example, in
var o = {'a' : 1, b: 2};
the string 'a' is quoted, while the name b is turned into a string, but
unquoted.
Transforms the given node and then sets its type to Token . STRING if it was Token . NAME . If its type was already Token . STRING then quotes it . Used for properties as the old AST uses String tokens while the new one uses Name tokens for unquoted strings . For example in var o = { ' a ' : 1 b : 2 } ; the string ' a ' is quoted while the name b is turned into a string but unquoted .
private Node processObjectLitKeyAsString(
        com.google.javascript.jscomp.parsing.parser.Token token) {
      Node ret;
      if (token == null) {
        return createMissingExpressionNode();
      } else if (token.type == TokenType.IDENTIFIER) {
        ret = processName(token.asIdentifier(), true);
      } else if (token.type == TokenType.NUMBER) {
        ret = transformNumberAsString(token.asLiteral());
        ret.putBooleanProp(Node.QUOTED_PROP, true);
      } else {
        ret = processString(token.asLiteral());
        ret.putBooleanProp(Node.QUOTED_PROP, true);
      }
      checkState(ret.isString());
      return ret;
    }
private Node processObjectLitKeyAsString ( com . google . javascript . jscomp . parsing . parser . Token token ) { Node ret ; if ( token == null ) { return createMissingExpressionNode ( ) ; } else if ( token . type == TokenType . IDENTIFIER ) { ret = processName ( token . asIdentifier ( ) , true ) ; } else if ( token . type == TokenType . NUMBER ) { ret = transformNumberAsString ( token . asLiteral ( ) ) ; ret . putBooleanProp ( Node . QUOTED_PROP , true ) ; } else { ret = processString ( token . asLiteral ( ) ) ; ret . putBooleanProp ( Node . QUOTED_PROP , true ) ; } checkState ( ret . isString ( ) ) ; return ret ; }
Transforms the given node and then sets its type to Token.STRING if it
 was Token.NAME.
Transforms the given node and then sets its type to Token . STRING if it was Token . NAME .