Mercurial Hosting > luan
diff src/luan/modules/parsers/Csv.java @ 1267:9fa8b8389578
add LuanTable.luan;
support metatable __gc();
add luan.sql;
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 12 Nov 2018 02:10:41 -0700 |
parents | 88b5b81cad4a |
children | f41919741100 |
line wrap: on
line diff
--- a/src/luan/modules/parsers/Csv.java Sun Sep 30 19:10:48 2018 -0600 +++ b/src/luan/modules/parsers/Csv.java Mon Nov 12 02:10:41 2018 -0700 @@ -1,5 +1,6 @@ package luan.modules.parsers; +import luan.LuanState; import luan.LuanTable; import luan.lib.parser.Parser; import luan.lib.parser.ParseException; @@ -7,8 +8,8 @@ public final class Csv { - public static LuanTable toList(String line) throws ParseException { - return new Csv(line).parse(); + public static LuanTable toList(LuanState luan,String line) throws ParseException { + return new Csv(line).parse(luan); } private final Parser parser; @@ -21,8 +22,8 @@ return new ParseException(parser,msg); } - private LuanTable parse() throws ParseException { - LuanTable list = new LuanTable(); + private LuanTable parse(LuanState luan) throws ParseException { + LuanTable list = new LuanTable(luan); while(true) { Spaces(); String field = parseField();