diff src/luan/modules/parsers/Css.java @ 1562:b89212fd04b5

remove table.luan
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 08 Nov 2020 16:50:59 -0700
parents 27efb1fcbcb5
children
line wrap: on
line diff
--- a/src/luan/modules/parsers/Css.java	Thu Nov 05 20:24:09 2020 -0700
+++ b/src/luan/modules/parsers/Css.java	Sun Nov 08 16:50:59 2020 -0700
@@ -8,24 +8,22 @@
 
 public final class Css {
 
-	public static LuanTable style(Luan luan,String text) {
+	public static LuanTable style(String text) {
 		try {
-			return new Css(luan,text).parseStyle();
+			return new Css(text).parseStyle();
 		} catch(LuanException e) {
 			throw new RuntimeException(e);
 		}
 	}
 
-	private final Luan luan;
 	private final Parser parser;
 
-	private Css(Luan luan,String text) {
-		this.luan = luan;
+	private Css(String text) {
 		this.parser = new Parser(text);
 	}
 
 	private LuanTable parseStyle() throws LuanException {
-		LuanTable tbl = new LuanTable(luan);
+		LuanTable tbl = new LuanTable();
 		while( matchSpace() );
 		while( !parser.endOfInput() ) {
 			int start = parser.currentIndex();
@@ -42,7 +40,7 @@
 			while( !parser.endOfInput() && parser.noneOf(";") );
 			String val = parser.textFrom(start).trim();
 
-			tbl.put(prop,val);
+			tbl.rawPut(prop,val);
 			parser.match(';');
 			while( matchSpace() );
 		}