Fuel.literal: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/pedantic/fuel.bend as Fuel Lines 116-129 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=116&end_line=129 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 # an argument that is a Nat literal alone (digits, then `n`), or # `U32.to_nat` of a U32 literal alone, as a finding def literal(aa: Tree.Node, +path: String) -> List<&2, F.Finding>: match aa: case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TNum{}, +t, l, c}}, Tree.NNil{}}: Bool.pick(List<&2, F.Finding>, T.nat_ok(String.to_list(t)), [F.Finding{path, l, c, U32.from_nat(String.length(t)), "fuel", "The fuel is fixed at " ++ t ++ ", so longer input is silently cut short; derive the fuel from the input size."}], []) case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TDotted{}, +t, l, c}}, Tree.NCons{Tree.Group{Lex.Tok{ok, +o, ol, oc}, kids, cl}, Tree.NNil{}}}: converted(kids, Bool.and(String.eq(t, "U32.to_nat"), String.eq(o, "(")), l, c, path) case other: Nil{} Uses (15): 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=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.eq 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.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/pedantic/fuel.bend&name=converted https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/tokens.bend&name=nat_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