<commit_before>package pman.format.pmsh;

import tannus.io.*;
import tannus.ds.*;
import tannus.TSys as Sys;

import pman.async.*;
import pman.format.pmsh.Token;
import pman.format.pmsh.Expr;
import pman.format.pmsh.Cmd;

import electron.Tools.*;
import Slambda.fn;

using StringTools;
using tannus.ds.StringUtils;
using Lambda;
using tannus.ds.ArrayTools;
using Slambda;
using pman.async.VoidAsyncs;

class Interpreter {
    /* Constructor Function */
    public function new():Void {
        environment = new Dict();
        commands = new Map();

        __init();
    }

/* === Instance Methods === */

    /**
      * initialize [this]
      */
    private function __init():Void {
        __initEnvironment();
        __initCommands();
    }

    /**
      * initialize environment
      */
    private function __initEnvironment():Void {
        var env = Sys.environment();
        for (key in env.keys()) {
            environment[key] = env[key];
        }
    }
    
    /**
      * set a variable
      */
    private inline function setenv(k:String, v:String) return environment.set(k, v);

    /**
      * write many variables, from any key->value data structure
      */
    private function env(vars : Dynamic):Void {
        if ((vars is Map<String, String>)) {
            var sm:Map<String, String> = vars;
            for (k in sm.keys()) {<commit_msg>fixed type error for new haxe preview build<commit_after>package pman.format.pmsh;

import tannus.io.*;
import tannus.ds.*;
import tannus.TSys as Sys;

import pman.async.*;
import pman.format.pmsh.Token;
import pman.format.pmsh.Expr;
import pman.format.pmsh.Cmd;

import electron.Tools.*;
import Slambda.fn;

using StringTools;
using tannus.ds.StringUtils;
using Lambda;
using tannus.ds.ArrayTools;
using Slambda;
using pman.async.VoidAsyncs;

class Interpreter {
    /* Constructor Function */
    public function new():Void {
        environment = new Dict();
        commands = new Map();

        __init();
    }

/* === Instance Methods === */

    /**
      * initialize [this]
      */
    private function __init():Void {
        __initEnvironment();
        __initCommands();
    }

    /**
      * initialize environment
      */
    private function __initEnvironment():Void {
        var env = Sys.environment();
        for (key in env.keys()) {
            environment[key] = env[key];
        }
    }
    
    /**
      * set a variable
      */
    private inline function setenv(k:String, v:String) return environment.set(k, v);

    /**
      * write many variables, from any key->value data structure
      */
    private function env(vars : Dynamic):Void {
        if ((vars is haxe.ds.StringMap<Dynamic>)) {
            var sm:Map<String, String> = vars;
            for (k in sm.keys()) {
{'fraction_non_alphanumeric': 0.12899748472871003, 'fraction_numerical': 0.0, 'mean_word_length': 2.366384522370012, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3380874', 'n_tokens_mistral': 849, 'n_tokens_neox': 856, 'n_words': 220}