File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ @abstract
12@tool
23class_name Annotation
34extends RefCounted
@@ -30,13 +31,13 @@ func find_in_tree(tree: TreeSitterSyntaxTree) -> Array:
3031
3132## Gets the TreeSitter query which selects this annotation from a GDScript
3233## syntax tree.
33- func _get_query_template () -> String :
34- return Errors . abstract_method ( " _get_query_template" )
34+ @abstract
35+ func _get_query_template () -> String
3536
3637
3738## Parses annotation-specific metadata from a TreeSitter query match.
38- func _from_match ( query_match : Dictionary ) -> Dictionary :
39- return Errors . abstract_method ( "_from_match" )
39+ @abstract
40+ func _from_match ( query_match : Dictionary ) -> Dictionary
4041
4142
4243func _from_match_adding_argument (query_match : Dictionary ) -> Dictionary :
Original file line number Diff line number Diff line change 1+ @abstract
12@tool
23class_name Codegen
34extends RefCounted
@@ -11,14 +12,14 @@ static func _load_template(path: String) -> InjaTemplate:
1112
1213
1314## Which annotations, if any, are used by this Codegen.
14- func get_required_annotations () -> Array [ Annotation ]:
15- return Errors . abstract_method ( " get_required_annotations" )
15+ @abstract
16+ func get_required_annotations () -> Array [ Annotation ]
1617
1718
1819## Generate units of code from the given GDScript resource.
20+ @abstract
1921func get_codegen_units (
20- script : GDScript , annotations : Annotations ) -> Array [Unit ]:
21- return Errors .abstract_method ("get_codegen_units" )
22+ script : GDScript , annotations : Annotations ) -> Array [Unit ]
2223
2324
2425class Unit :
Original file line number Diff line number Diff line change 1+ @abstract
12@tool
23class_name CodegenWriter
34extends RefCounted
45
56## An abstract generated code writer which can, e.g., write to a file.
67
78
8- func write ( new_source : String ) -> bool :
9- return Errors . abstract_method ( "write" )
9+ @abstract
10+ func write ( new_source : String ) -> bool
Original file line number Diff line number Diff line change 1+ @abstract
12@tool
23class_name ScriptProcessor
34extends RefCounted
@@ -46,5 +47,5 @@ func apply_to_project() -> void:
4647
4748
4849## Acts on a single GDSCript source.
49- func apply_to_script ( script : GDScript ) -> void :
50- Errors . abstract_method ( "apply_to_script" )
50+ @abstract
51+ func apply_to_script ( script : GDScript ) -> void
You can’t perform that action at this time.
0 commit comments