Skip to content

Commit 60a2c88

Browse files
committed
entry block: Allow multi-line opening statement
It may be that there isn't a 1-1 correspondance between blocks and lines of code. For a contrived example, you might want to wrap the parameter list, or include a documentation comment. And in particular, a future commit will add a preamble inside the generated function for an entry block that converts a parameter to a different type. Or you could imagine wanting to generate a top-level variable or signal to accompany an entry block.
1 parent 575a7d5 commit 60a2c88

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

addons/block_code/ui/blocks/entry_block/entry_block.gd

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,4 @@ func get_entry_statement() -> String:
2222
for pair in param_name_input_pairs:
2323
formatted_statement = formatted_statement.replace("{%s}" % pair[0], pair[1].get_string())
2424

25-
# One line, should not have \n
26-
if formatted_statement.find("\n") != -1:
27-
push_error("Entry block has multiline statement.")
28-
2925
return formatted_statement

0 commit comments

Comments
 (0)