@@ -50,7 +50,7 @@ private enum Token
5050 // @formatter:off
5151 /* TableStart TableEnd KeyStart KeyEnd Literal*/
5252 /* Unknown */ new [ ] { State . Error , State . Error , State . Error , State . Error , State . Error } ,
53- /* Start */ new [ ] { State . TableStart , State . Error , State . Error , State . Error , State . Start } ,
53+ /* Start */ new [ ] { State . TableStart , State . Error , State . KeyStart , State . Error , State . FieldStart } ,
5454 /* TableStart */ new [ ] { State . TableStart , State . Unknown , State . KeyStart , State . Error , State . FieldStart } ,
5555 /* FieldStart */ new [ ] { State . TableStart , State . Unknown , State . KeyStart , State . Error , State . FieldStart } ,
5656 /* KeyStart */ new [ ] { State . TableStart , State . Error , State . Error , State . Error , State . Key } ,
@@ -231,7 +231,6 @@ public virtual void WriteEndTable()
231231 /// </summary>
232232 public virtual void WriteStartKey ( )
233233 {
234- AssertContainerType ( LuaContainerType . Table ) ;
235234 DelimitLastValue ( Token . KeyStart ) ;
236235 Writer . Write ( '[' ) ;
237236 Push ( LuaContainerType . Key ) ;
@@ -263,7 +262,6 @@ public virtual void WriteKey(string key)
263262 if ( key == null ) throw new ArgumentNullException ( nameof ( key ) ) ;
264263 if ( key . Length <= MaxUnquotedNameLength && LuaConvert . IsValidIdentifier ( key ) )
265264 {
266- AssertContainerType ( LuaContainerType . Table ) ;
267265 DelimitLastValue ( Token . KeyStart ) ;
268266 GotoNextState ( Token . Literal ) ;
269267 Writer . Write ( key ) ;
0 commit comments