<commit_before>// Copyright (c) 2013 <NAME>
// Licensed under the MIT license.

package main

import (
	"flag"
	"fmt"
	"github.com/MathieuTurcotte/sourcemap"
	"os"
)

var line = flag.Int("line", -1, "line number to lookup")
var column = flag.Int("column", -1, "column number to lookup")
var printMap = flag.Bool("print", false, "whether to print the source map")

func main() {
	flag.Parse()

	sourceMap, err := sourcemap.Read(os.Stdin)

	if err != nil {
		fmt.Println(err)
	} else if *printMap {
		fmt.Printf("%+v\n", sourceMap)
	}

	mapping, err := sourceMap.GetSourceMapping(*line, *column)

	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Printf("%+v\n", mapping)
	}
}<commit_msg>Remove print option.<commit_after>// Copyright (c) 2013 <NAME>
// Licensed under the MIT license.

// Program that reads a source map from stdin and finds the original mapping
// for the given line and column numbers in the generated source.
package main

import (
	"flag"
	"fmt"
	"github.com/MathieuTurcotte/sourcemap"
	"os"
)

var line = flag.Int("line", -1, "line number to lookup")
var column = flag.Int("column", -1, "column number to lookup")

func main() {
	flag.Parse()

	sourceMap, err := sourcemap.Read(os.Stdin)
	if err != nil {
		fmt.Print(err)
		os.Exit(1)
	}

	mapping, err := sourceMap.GetSourceMapping(*line, *column)
	if err != nil {
		fmt.Print(err)
		os.Exit(1)
	}

	fmt.Printf("%+v\n", mapping)
}
{'fraction_non_alphanumeric': 0.1581196581196581, 'fraction_numerical': 0.009971509971509971, 'mean_word_length': 3.795221843003413, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '459361', 'n_tokens_mistral': 530, 'n_tokens_neox': 507, 'n_words': 150}