OMetaJS Editor
function t(name,pattern) { console.log(Foo.matchAll(pattern,name)); } ometa Foo { h1 = "###" toEOL:t -> [#h1,t], h2 = "##" toEOL:t -> [#h2,t], h3 = "#" toEOL:t -> [#h3,t], toEOL = (~seq('\n') char)*:t '\n' -> t.join("") } t('h1', '### a\n');