Mercurial Hosting > luan
comparison src/luan/impl/LuanParser.java @ 1542:d4407e8de707
disallow duplicates in table constructor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 20 Sep 2020 15:53:58 -0600 |
parents | d9a5405a3102 |
children | 33a53c43e2f7 |
comparison
equal
deleted
inserted
replaced
1541:dc23c96f5021 | 1542:d4407e8de707 |
---|---|
1155 return parser.failure(null); | 1155 return parser.failure(null); |
1156 Expr tblExp = new Expr(Val.SINGLE,false); | 1156 Expr tblExp = new Expr(Val.SINGLE,false); |
1157 tblExp.add( "LuanImpl.table(luan," ); | 1157 tblExp.add( "LuanImpl.table(luan," ); |
1158 Expr lastExp = tblExp; | 1158 Expr lastExp = tblExp; |
1159 List<Expr> builder = new ArrayList<Expr>(); | 1159 List<Expr> builder = new ArrayList<Expr>(); |
1160 /* | |
1161 Spaces(); | |
1162 Field(builder); | |
1163 while( FieldSep() ) { | |
1164 Spaces(); | |
1165 Field(builder); | |
1166 } | |
1167 */ | |
1168 do { | 1160 do { |
1169 Spaces(); lastExp.addNewLines(); | 1161 Spaces(); lastExp.addNewLines(); |
1170 Expr exp = Field(); | 1162 Expr exp = Field(); |
1171 if( exp != null ) { | 1163 if( exp != null ) { |
1172 builder.add(exp); | 1164 builder.add(exp); |