{"size": 666, "ext": "js", "max_stars_repo_path": "packages/alloy-compiler/lib/parsers/Ti.Map.Annotation.js", "max_stars_repo_name": "ewanharris/alloy-devkit", "max_stars_repo_stars_event_min_datetime": "2020-01-24T16:30:36.000Z", "max_stars_repo_stars_event_max_datetime": "2020-01-24T16:30:36.000Z", "max_issues_repo_path": "packages/alloy-compiler/lib/parsers/Ti.Map.Annotation.js", "max_issues_repo_name": "ewanharris/alloy-devkit", "max_issues_repo_issues_event_min_datetime": "2020-03-13T13:24:43.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-28T07:03:16.000Z", "max_forks_repo_path": "packages/alloy-compiler/lib/parsers/Ti.Map.Annotation.js", "max_forks_repo_name": "ewanharris/alloy-devkit", "max_forks_repo_forks_event_min_datetime": "2020-05-18T16:14:34.000Z", "max_forks_repo_forks_event_max_datetime": "2020-05-18T16:14:34.000Z"}
{"max_stars_count": 1, "max_issues_count": 165, "max_forks_count": 1, "avg_line_length": 20.1818181818, "max_line_length": 54, "alphanum_fraction": 0.6336336336}
var styler = require('../styler'),
	_ = require('lodash');

exports.parse = function (node, state) {
	return require('./base').parse(node, state, parse);
};

function parse(node, state, args) {
	var extraStyle = [];
	_.each([ 'latitude', 'longitude' ], function (attr) {
		var geo = node.getAttribute(attr);
		if (geo) {
			extraStyle.push([ attr, parseFloat(geo) ]);
			node.removeAttribute(attr);
		}
	});

	var code = require('./default').parse(node, {
		parent: {},
		styles: state.styles,
		extraStyle: styler.createVariableStyle(extraStyle)
	}).code;

	return {
		parent: {
			node: node,
			symbol: args.symbol
		},
		styles: state.styles,
		code: code
	};
}
