sfp 0.3.14 → 0.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/src/SfpLang.g CHANGED
@@ -116,6 +116,11 @@ attribute
116
116
  {
117
117
  @now['_finals'] << $attribute_stmt.id if @is_final and !$attribute_stmt.id.nil?
118
118
  }
119
+ | {
120
+ @is_final = false
121
+ @now['_finals'] = [] if !@now.has_key? '_finals'
122
+ }
123
+ ('final' { @is_final = true })? object_def NL+
119
124
  ;
120
125
 
121
126
  attribute_stmt returns [id]
@@ -169,8 +174,6 @@ attribute_stmt returns [id]
169
174
  end
170
175
  $id = $ID.text
171
176
  }
172
- | object_def NL+
173
- { $id = nil }
174
177
  ;
175
178
 
176
179
  object_schema
@@ -191,8 +194,11 @@ abstract_object
191
194
  ;
192
195
 
193
196
  object_def returns [id]
194
- : { @use_template = false }
195
- ID { $id = $ID.text }
197
+ : ID { $id = $ID.text }
198
+ {
199
+ @use_template = false
200
+ @now['_finals'] << $ID.text if @is_final
201
+ }
196
202
  ('extends' path
197
203
  {
198
204
  template = @root.at?($path.text)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sfp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.14
4
+ version: 0.3.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: antlr3
16
- requirement: &9362480 !ruby/object:Gem::Requirement
16
+ requirement: &14422320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 1.9.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *9362480
24
+ version_requirements: *14422320
25
25
  description: A Ruby API and script for SFP language parser
26
26
  email: herry13@gmail.com
27
27
  executables: