mirror of
https://github.com/open-goal/jak-project
synced 2026-05-28 08:25:56 -04:00
formatter: better support for function calls from functions but it's still not great, requires more research
This commit is contained in:
@@ -312,7 +312,7 @@ std::vector<std::string> apply_formatting(const FormatterTreeNode& curr_node,
|
||||
if (i == (int)curr_node.refs.size() - 1 && form_lines.size() > 1 &&
|
||||
(curr_node.formatting_config.hang_forms ||
|
||||
curr_node.formatting_config.combine_first_two_lines)) {
|
||||
form_lines.at(0) += fmt::format(" {}", form_lines.at(1));
|
||||
form_lines.at(0) += fmt::format(" {}", str_util::ltrim(form_lines.at(1)));
|
||||
form_lines.erase(form_lines.begin() + 1);
|
||||
} else if ((i + 1) < (int)curr_node.refs.size()) {
|
||||
const auto& next_ref = curr_node.refs.at(i + 1);
|
||||
|
||||
@@ -150,39 +150,18 @@ Long array creation
|
||||
(the-as (function none) (-> arr i)))))
|
||||
|
||||
===
|
||||
!Nested function call
|
||||
TODO - Nested function call
|
||||
===
|
||||
|
||||
(set! (-> this attack-event)
|
||||
(the-as symbol ((the-as
|
||||
(function res-lump symbol symbol float structure (pointer res-tag) pointer object)
|
||||
(method-of-type res-lump get-property-struct)
|
||||
)
|
||||
(-> this entity)
|
||||
'attack-event
|
||||
'interp
|
||||
-1000000000.0
|
||||
'dark-eco-pool
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(the-as symbol
|
||||
((the-as (function res-lump symbol symbol float structure (pointer res-tag) pointer object) (method-of-type res-lump get-property-struct))
|
||||
(-> this entity)
|
||||
'attack-event)))
|
||||
---
|
||||
|
||||
(set! (-> this attack-event)
|
||||
(the-as symbol ((the-as
|
||||
(function res-lump symbol symbol float structure (pointer res-tag) pointer object)
|
||||
(method-of-type res-lump get-property-struct)
|
||||
)
|
||||
(-> this entity)
|
||||
'attack-event
|
||||
'interp
|
||||
-1000000000.0
|
||||
'dark-eco-pool
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as symbol
|
||||
((the-as (function res-lump symbol symbol float structure (pointer res-tag) pointer object) (method-of-type res-lump get-property-struct))
|
||||
(-> this entity)
|
||||
'attack-event)))
|
||||
Reference in New Issue
Block a user