Skip to content

Commit 4a17bf1

Browse files
committed
Process now have two separate functions
1 parent bfb0a24 commit 4a17bf1

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

json_config_file/json_config_processor.gd

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ class_name JSONConfigProcessor
44
var _property
55

66

7-
func add_error(error) -> void:
7+
func add_error(error: Dictionary) -> void:
88
_property._errors.append(error)
99

1010

11-
func add_warning(warning) -> void:
11+
func add_warning(warning: Dictionary) -> void:
1212
_property._warnings.append(warning)
1313

1414

@@ -35,5 +35,9 @@ func get_property():
3535
return _property
3636

3737

38-
func _process(value):
38+
func _preprocess() -> void:
39+
pass
40+
41+
42+
func _postprocess(value):
3943
return value

json_config_file/json_properties/json_property.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,13 @@ func _validate(parent: JSONProperty, property) -> void:
281281
_copy_variables(parent)
282282
_init_processors()
283283

284-
_preprocessor._process(property)
284+
_preprocessor._preprocess()
285285

286286
if not _has_errors():
287287
_validate_type(property)
288288

289289
if not _has_errors():
290-
_result = _postprocessor._process(_get_result())
290+
_result = _postprocessor._postprocess(_get_result())
291291

292292

293293
func _reset() -> void:

0 commit comments

Comments
 (0)