MCPcopy Create free account
hub / github.com/cogentcore/core / CompileAll

Method CompileAll

parse/parser/rule.go:225–237  ·  view source on GitHub ↗

CompileAll is called on the top-level Rule to compile all nodes it calls SetRuleMap first. Returns true if everything is ok, false if there were compile errors

(ps *State)

Source from the content-addressed store, hash-verified

223// it calls SetRuleMap first.
224// Returns true if everything is ok, false if there were compile errors
225func (pr *Rule) CompileAll(ps *State) bool {
226 pr.SetRuleMap(ps)
227 allok := true
228 pr.WalkDown(func(k tree.Node) bool {
229 pri := k.(*Rule)
230 ok := pri.Compile(ps)
231 if !ok {
232 allok = false
233 }
234 return true
235 })
236 return allok
237}
238
239// Compile compiles string rules into their runnable elements.
240// Returns true if everything is ok, false if there were compile errors.

Callers

nothing calls this directly

Calls 3

SetRuleMapMethod · 0.95
WalkDownMethod · 0.80
CompileMethod · 0.45

Tested by

no test coverage detected