<commit_before>'use strict';

var chai = require('chai');
chai.config.includeStack = true;
var assert = chai.assert;

var path = require('path'),
    stringify = require('json-stringify-safe');

var emulator = require('../../src/emulator'),
    compiler = require('../../src/ghc/compiler');

describe('Sample tests', function () {
    it.only('should compile a program', function () {
        var code = [
            '; consts',
            'fright := 1',

            '; awareness',
            'me := who( )',
            'myStartX, myStartY := start(me)',
            'myPosX, myPosY := pos(me)',
            'targetX, targetY := pacman(1)',
            'myMode := mode(me)',
            // 'ifEqual(myMode, fright, runaway, myPos, target)',
            'tile := map(0, 0)',
            'dir := findWay(myPosX, myPosY, targetX, targetY)',
            'go(dir)',
            'done()',
            'findWay: a := 0 ; start',
            'end-findWay: a := 1'
        ].join('\n');

        var ghc = compiler(code);

        console.log('------');<commit_msg>run all tests<commit_after>'use strict';

var chai = require('chai');
chai.config.includeStack = true;
var assert = chai.assert;

var path = require('path'),
    stringify = require('json-stringify-safe');

var emulator = require('../../src/emulator'),
    compiler = require('../../src/ghc/compiler');

describe('Sample tests', function () {
    it('should compile a program', function () {
        var code = [
            '; consts',
            'fright := 1',

            '; awareness',
            'me := who( )',
            'myStartX, myStartY := start(me)',
            'myPosX, myPosY := pos(me)',
            'targetX, targetY := pacman(1)',
            'myMode := mode(me)',
            // 'ifEqual(myMode, fright, runaway, myPos, target)',
            'tile := map(0, 0)',
            'dir := findWay(myPosX, myPosY, targetX, targetY)',
            'go(dir)',
            'done()',
            'findWay: a := 0 ; start',
            'end-findWay: a := 1'
        ].join('\n');

        var ghc = compiler(code);

        console.log('------');
{'fraction_non_alphanumeric': 0.19225318847425601, 'fraction_numerical': 0.005668398677373642, 'mean_word_length': 1.8855585831062671, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '75558', 'n_tokens_mistral': 665, 'n_tokens_neox': 638, 'n_words': 149}