Class properties are optional

This commit is contained in:
Cary R 2013-05-14 14:58:34 -07:00
parent 7c1638652a
commit b0b6be0d23
1 changed files with 7 additions and 2 deletions

View File

@ -1,7 +1,7 @@
%{
/*
* Copyright (c) 2001-2012 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2013 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -847,7 +847,7 @@ statement
| T_LABEL K_CLASS T_STRING '[' T_NUMBER ']'
{ compile_class_start($1, $3, $5); }
class_properties ';'
class_properties_opt ';'
{ compile_class_done(); }
| enum_type
@ -858,6 +858,11 @@ statement
| ';'
;
class_properties_opt
: class_properties
|
;
class_properties
: class_properties class_property
| class_property