[up] [log] [?]
[first]  [entry] [exit]  [last]

(meg/match ~{:close-tag (drop (* "</" (cmt (* (backref :tag-name) (capture :w+)) "<function =>") ">")) :main (* :tagged -1) :open-tag (* (constant :tag) "<" (capture :w+ :tag-name) ">") :tagged (unref (replace (* :open-tag :value :close-tag) "<cfunction struct>")) :untagged (capture (some (if-not "<" 1))) :value (* (constant :value) (group (any (+ :tagged :untagged))))}
           "<p><em>Hello</em> <strong>world</strong>!</p>")

captures and tags
captures: @[:tag "p" :value :tag "em" :value]
tagged-captures:
  tags: @[nil :tag-name nil nil :tag-name nil]
  values: @[:tag "p" :value :tag "em" :value]

current frame
status: entered frame 70
peg: (if-not "<" 1)
text: <p><em>Hello</em> <strong>world</strong>!</p>
index: 11

frames call stack
70 (if-not "<" 1)
57 (some (if-not "<" 1))
56 (capture (some (if-not "<" 1)))
55 :untagged
46 (+ :tagged :untagged)
45 (any (+ :tagged :untagged))
44 (group (any (+ :tagged :untagged)))
42 (* (constant :value) (group (any (+ :tagged :untagged))))
41 :value
26 (* :open-tag :value :close-tag)
25 (replace (* :open-tag :value :close-tag) "<cfunction struct>")
24 (unref (replace (* :open-tag :value :close-tag) "<cfunction struct>"))
23 :tagged
22 (+ :tagged :untagged)
21 (any (+ :tagged :untagged))
20 (group (any (+ :tagged :untagged)))
18 (* (constant :value) (group (any (+ :tagged :untagged))))
17 :value
4 (* :open-tag :value :close-tag)
3 (replace (* :open-tag :value :close-tag) "<cfunction struct>")
2 (unref (replace (* :open-tag :value :close-tag) "<cfunction struct>"))
1 :tagged
0 (* :tagged -1)