Mercurial Hosting > nabble
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
1 package nabble.view.web.template; | |
2 | |
3 import java.net.URL; | |
4 import fschmidt.util.java.IoUtils; | |
5 import nabble.naml.dom.Naml; | |
6 import nabble.naml.dom.ParseException; | |
7 | |
8 | |
9 public final class NamlTest { | |
10 | |
11 public static void main(String[] args) throws Exception { | |
12 for( URL url : IoUtils.getResources(NamlTest.class) ) { | |
13 String name = url.toString(); | |
14 if( name.endsWith(".naml") ) { | |
15 String content = IoUtils.read(url); | |
16 try { | |
17 Naml.parser().parse(content); | |
18 } catch(ParseException e) { | |
19 throw new RuntimeException("failed to parse "+name,e); | |
20 } | |
21 } | |
22 } | |
23 } | |
24 | |
25 } |