Fuel.converted: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/pedantic/fuel.bend as Fuel Lines 103-114 of bolt@1.27.0.0/src/rules/pedantic/fuel.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/pedantic/fuel.bend&start_line=103&end_line=114 import Base import bolt@1.27.0.0/src/finding.bend as F import bolt@1.27.0.0/src/syntax/lex.bend as Lex import bolt@1.27.0.0/src/syntax/tree.bend as Tree import bolt@1.27.0.0/src/rules/tokens.bend as T # the group of a call at line ll, column cc, as a finding when it holds one # U32 literal alone (digits) and ok says the call is `U32.to_nat(` def converted(kids: Tree.Node, ok: Bool, +ll: U32, +cc: U32, +path: String) -> List<&2, F.Finding>: match kids: case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TNum{}, +t, l, c}}, Tree.NNil{}}: Bool.pick(List<&2, F.Finding>, Bool.and(ok, T.digits_ok(String.to_list(t))), [F.Finding{path, ll, cc, U32.from_nat(Nat.add(String.length(t), 12n)), "fuel", "The fuel is fixed at U32.to_nat(" ++ t ++ "), so longer input is silently cut short; derive the fuel from the input size."}], []) case other: Nil{} Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.to_list https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/finding.bend&name=Finding https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/tokens.bend&name=digits_ok https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=TokKind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node