<commit_before>#![feature(phase)]

#[phase(plugin)] extern crate scan;
extern crate scan_util;

#[deriving(Show)]
struct Pair(pub int, pub int);

scanner! { Pair,
	x:int ".." => Pair(x, 0),
	x:int y:int => Pair(x, y),
}

#[test]
fn test_pair() {
	let res = scan! { "1 2 wat", p:Pair w:&str => format!("{} {}", p, w) };
	assert_eq!(res, Ok("Pair(1, 2) wat".into_string()));
<commit_msg>Fixed enum namespacing problem in scanner test.<commit_after>#![feature(phase)]

#[phase(plugin)] extern crate scan;
extern crate scan_util;

use self::Expr::{Lit, Add, Sub, Mul, Div};

#[deriving(Show)]
struct Pair(pub int, pub int);

scanner! { Pair,
	x:int ".." => Pair(x, 0),
	x:int y:int => Pair(x, y),
}

#[test]
fn test_pair() {
	let res = scan! { "1 2 wat", p:Pair w:&str => format!("{} {}", p, w) };
	assert_eq!(res, Ok("Pair(1, 2) wat".into_string()));

{'fraction_non_alphanumeric': 0.23349056603773585, 'fraction_numerical': 0.01179245283018868, 'mean_word_length': 5.0212765957446805, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1152852', 'n_tokens_mistral': 354, 'n_tokens_neox': 342, 'n_words': 94}