class Novika::Resolver::Manifest::Preprocessor

Overview

Base class for several subtractive preprocessors for manifest content.

They are subtractive because they discard stuff, at least from the original content's point of view.

Also, one might say subtractive preprocessors match "edges" rather than by "structure". If done repeatedly and so to speak recursively, one might finally arrive at "grains" coarse enough for "real" content analysis. In this sense subtractive preprocessors are "noise-friendly" -- and that's just what we want. Moreover, they may consider each other "noise", too.

Preprocessors can be chained, and can programmaticaly select the next preprocessor (or become the terminal one) in #next?.

Direct Known Subclasses

Defined in:

novika/resolver.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present) #

[View source]

Instance Method Detail

def next? : Preprocessor | Nil #

Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.


[View source]
def preprocess(content : String) : String #

Returns subtractively preprocessed content string. That is, the returned string will be shorter or of the same length as content.


[View source]