Skip to content

Commit b491734

Browse files
authored
Merge pull request #27 from nadako/fromHxx_pos
make generated fromHxx position the same as class position so goto-definition takes to the class instead of macro code
2 parents b65ebd0 + 2007694 commit b491734

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/coconut/react/View.macro.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ class View {
166166
}
167167
});
168168

169-
parametrize(added[added.length - 1], cls);
169+
var fromHxx = added[added.length - 1];
170+
fromHxx.pos = cls.pos;
171+
parametrize(fromHxx, cls);
170172

171173
}
172174
static function autoBuild()

src/coconut/react/macros/Setup.hx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class Setup {
7777
}
7878
).fields;
7979

80+
add[0].pos = cls.pos;
8081
parametrize(add[0], cls);
8182

8283
fields.concat(add);

0 commit comments

Comments
 (0)