Mercurial Hosting > luan
comparison src/luan/modules/parsers/Css.java @ 1333:25746915a241
merge Luan and LuanState
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 12 Feb 2019 22:33:40 -0700 |
parents | f41919741100 |
children | 27efb1fcbcb5 |
comparison
equal
deleted
inserted
replaced
1332:11b7e11f9ed5 | 1333:25746915a241 |
---|---|
1 package luan.modules.parsers; | 1 package luan.modules.parsers; |
2 | 2 |
3 import luan.LuanState; | 3 import luan.Luan; |
4 import luan.LuanTable; | 4 import luan.LuanTable; |
5 import luan.LuanException; | 5 import luan.LuanException; |
6 import luan.lib.parser.Parser; | 6 import luan.lib.parser.Parser; |
7 | 7 |
8 | 8 |
9 public final class Css { | 9 public final class Css { |
10 | 10 |
11 public static LuanTable style(LuanState luan,String text) { | 11 public static LuanTable style(Luan luan,String text) { |
12 try { | 12 try { |
13 return new Css(luan,text).parseStyle(); | 13 return new Css(luan,text).parseStyle(); |
14 } catch(LuanException e) { | 14 } catch(LuanException e) { |
15 throw new RuntimeException(e); | 15 throw new RuntimeException(e); |
16 } | 16 } |
17 } | 17 } |
18 | 18 |
19 private final LuanState luan; | 19 private final Luan luan; |
20 private final Parser parser; | 20 private final Parser parser; |
21 | 21 |
22 private Css(LuanState luan,String text) { | 22 private Css(Luan luan,String text) { |
23 this.luan = luan; | 23 this.luan = luan; |
24 this.parser = new Parser(text); | 24 this.parser = new Parser(text); |
25 } | 25 } |
26 | 26 |
27 private LuanTable parseStyle() throws LuanException { | 27 private LuanTable parseStyle() throws LuanException { |