<commit_before>#pragma once

#include "node.hpp"

namespace wrd {

    class ref : public node, public tbindable<node> {
        WRD(CLASS(ref, node))

    public:
        ref() {}
        explicit ref(const node& new1): _str(new1) {}
        explicit ref(const node* new1): _str(new1) {}
        ref(const me& rhs): super(rhs) {
            bind(*rhs);
        }

        node* operator->() { return &get(); }
        node& operator*() { return get(); }
        const node* operator->() const WRD_UNCONST_FUNC(operator->())
        const node& operator*() const WRD_UNCONST_FUNC(operator*())

        // node:
        ncontainer& subs() override {
            if (!_str) return nulOf<ncontainer>();
            return _str->subs();
        }

        using super::canRun;
        wbool canRun(const wtypes& types) const override {
            if (!_str) return false;<commit_msg>wrd: fix: ref should be like a immutable type<commit_after>#pragma once

#include "node.hpp"

namespace wrd {

    class ref : public node, public tbindable<node> {

        struct refType : public wtype {
            wbool isImmutable() const override { return true; }

        protected:
            const ases& _getImpliAses() const override {
                static ases inner;
                return inner;
            }
        };
        WRD(CLASS(ref, node, refType))

    public:
        ref() {}
        explicit ref(const node& new1): _str(new1) {}
        explicit ref(const node* new1): _str(new1) {}
        ref(const me& rhs): super(rhs) {
            bind(*rhs);
        }

        node* operator->() { return &get(); }
        node& operator*() { return get(); }
        const node* operator->() const WRD_UNCONST_FUNC(operator->())
        const node& operator*() const WRD_UNCONST_FUNC(operator*())

        // node:
        ncontainer& subs() override {
            if (!_str) return nulOf<ncontainer>();
            return _str->subs();
        }

        using super::canRun;
        wbool canRun(const wtypes& types) const override {
            if (!_str) return false;
{'fraction_non_alphanumeric': 0.12928123492522914, 'fraction_numerical': 0.003859141341051616, 'mean_word_length': 2.0321637426900585, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '2191119', 'n_tokens_mistral': 615, 'n_tokens_neox': 607, 'n_words': 171}