code: private JSType createRecordTypeFromNodes(Node n, String sourceName, StaticTypedScope scope) {
  
      RecordTypeBuilder builder = new RecordTypeBuilder(this);
  
      // For each of the fields in the record type.
      for (Node fieldTypeNode = n.getFirstChild();
           fieldTypeNode != null;
           fieldTypeNode = fieldTypeNode.getNext()) {
  
        // Get the property's name.
        Node fieldNameNode = fieldTypeNode;
        boolean hasType = false;
  
        if (fieldTypeNode.getToken() == Token.COLON) {
          fieldNameNode = fieldTypeNode.getFirstChild();
          hasType = true;
        }
  
        String fieldName = fieldNameNode.getString();
  
        // TODO(user): Move this into the lexer/parser.
        // Remove the string literal characters around a field name,
        // if any.
        if (fieldName.startsWith("'") || fieldName.startsWith("\"")) {
          fieldName = fieldName.substring(1, fieldName.length() - 1);
        }
  
        // Get the property's type.
        JSType fieldType = null;
  
        if (hasType) {
          // We have a declared type.
          fieldType = createFromTypeNodesInternal(
              fieldTypeNode.getLastChild(), sourceName, scope, true);
        } else {
          // Otherwise, the type is UNKNOWN.
          fieldType = getNativeType(JSTypeNative.UNKNOWN_TYPE);
        }
  
        builder.addProperty(fieldName, fieldType, fieldNameNode);
      }
  
      return builder.build();
    }
docs: Creates a RecordType from the nodes representing said record type.
  
  @param n The node with type info.
  @param sourceName The source file name.
  @param scope A scope for doing type name lookups.