Mercurial Hosting > nabble
view src/nabble/view/web/template/NamlTest.java @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
line wrap: on
line source
package nabble.view.web.template; import java.net.URL; import fschmidt.util.java.IoUtils; import nabble.naml.dom.Naml; import nabble.naml.dom.ParseException; public final class NamlTest { public static void main(String[] args) throws Exception { for( URL url : IoUtils.getResources(NamlTest.class) ) { String name = url.toString(); if( name.endsWith(".naml") ) { String content = IoUtils.read(url); try { Naml.parser().parse(content); } catch(ParseException e) { throw new RuntimeException("failed to parse "+name,e); } } } } }