You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I think I wrote right rules, something like this:
grammar Markdown
rule section_list
section (ln section_list)?
end
rule section
header ln content
end
rule header
'header'
end
rule content
'content'
end
rule ln
"\n"+
end
end
When I parse it and run #dump method, it output is:
And one more thing: if I define #value method for my rules, I cannot get this value anymore. So, in my results I always got header\ncontent text, but not result of #value.
Sorry for asking here, but nobody approved my question in
citrus–users
google group, so i'll try ask here (I really need the answer).So, I have some rules to parse something like this:
And then I need to get an array of hashes:
So, I think I wrote right rules, something like this:
When I parse it and run
#dump
method, it output is:But if I output
#captures
method, I see something like this:So, the main question is: how collect my parse results into a hash?
Thanks a lot for your awesome lib, help me please.
The text was updated successfully, but these errors were encountered: