Skip to content

Commit

Permalink
Merge pull request #27 from nadako/fromHxx_pos
Browse files Browse the repository at this point in the history
make generated fromHxx position the same as class position so goto-definition takes to the class instead of macro code
  • Loading branch information
back2dos committed May 29, 2024
2 parents b65ebd0 + 2007694 commit b491734
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/coconut/react/View.macro.hx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ class View {
}
});

parametrize(added[added.length - 1], cls);
var fromHxx = added[added.length - 1];
fromHxx.pos = cls.pos;
parametrize(fromHxx, cls);

}
static function autoBuild()
Expand Down
1 change: 1 addition & 0 deletions src/coconut/react/macros/Setup.hx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class Setup {
}
).fields;

add[0].pos = cls.pos;
parametrize(add[0], cls);

fields.concat(add);
Expand Down

0 comments on commit b491734

Please sign in to comment.