danm v0.1.4 Danm.CaseLogic

A case logic is a design entity with a list of cases anf choices, output the choice when subject match the first case the laast could be nil, which will match everything

Link to this section Summary

Functions

A case logic is just a wrapper around a list of expr. output is a string inputs is a map of %{name => width}

check if last case is default

create a case logic. all width assume to be 0 for now

check if subject's width match all cases, unless case is nil

Link to this section Functions

Link to this function

%Danm.CaseLogic{}

(struct)

A case logic is just a wrapper around a list of expr. output is a string inputs is a map of %{name => width}

Link to this function

last_is_default?(s)

check if last case is default

Link to this function

new(subject, list, list)

create a case logic. all width assume to be 0 for now

Link to this function

width_match?(s)

check if subject's width match all cases, unless case is nil