Css.css.score: def of gralha-css-style@0.1.0.1 Import: import gralha-css-style@0.1.0.1/css.bend as Css Lines 240-252 of gralha-css-style@0.1.0.1/css.bend: https://jend.leeeet.dev/read.txt?path=gralha-css-style@0.1.0.1/css.bend&start_line=240&end_line=252 import Base import gralha-text-scan@0.1.0.1/scan.bend as U def css.score(+fuel: Nat, +s: String) -> U32: match fuel s: case 0n _: 0 case 1n+d SNil{}: 0 case 1n+d SCon{Chr{c}, t}: U.branch(U32, U32.is_eq(c, 42), _ => css.score(d, t), _ => U.branch(U32, U32.is_eq(c, 35) || U32.is_eq(c, 46), _ => css.score.scan(css.ident(t, ""), U.choose(U32, U32.is_eq(c, 35), 1000000, 1000), rest => css.score(d, rest)), _ => U.branch(U32, U32.is_eq(c, 91), _ => css.score.scan(css.scan(t, 93), 1000, rest => css.score(d, U.drop(rest, "]"))), _ => U.branch(U32, U32.is_eq(c, 58), _ => css.score.pseudo(css.ident(t, ""), rest => css.score(d, rest), arg => css.score(d, arg)), _ => css.score.scan(css.ident(s, ""), 1, rest => css.score(d, rest)))))) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=css.ident https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=css.scan https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=css.score.pseudo https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=css.score.scan https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=branch https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=choose https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=drop