Skip to content

Commit

Permalink
fix link bug maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
camila314 committed Mar 6, 2024
1 parent 15de955 commit 5bb5703
Show file tree
Hide file tree
Showing 147 changed files with 12 additions and 7 deletions.
Binary file removed .cache/clangd/index/action.hpp.762E719B3E92454E.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/any.hpp.3EBFCBEC022B933D.idx
Binary file not shown.
Binary file removed .cache/clangd/index/apply.hpp.EEB71E47E3E3F6C6.idx
Binary file not shown.
Binary file removed .cache/clangd/index/apply0.hpp.CF4248FA69C1961E.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/apply_mode.hpp.A210F8D390FA7F75.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/ascii.hpp.21D6AE1B71B3FC10.idx
Binary file not shown.
Binary file removed .cache/clangd/index/ast.hpp.4FE7BD0E0DBA49DC.idx
Binary file not shown.
Binary file removed .cache/clangd/index/at.hpp.9D154057AC2AED95.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/bind.hpp.5E28D304F1046D7A.idx
Binary file not shown.
Binary file removed .cache/clangd/index/bof.hpp.14D9346EDE9DDCFF.idx
Binary file not shown.
Binary file removed .cache/clangd/index/bol.hpp.FAE5D0BFF2BEAAA7.idx
Binary file not shown.
Binary file removed .cache/clangd/index/broma.cpp.836BAC98E88B1B60.idx
Binary file not shown.
Binary file removed .cache/clangd/index/broma.hpp.0414FD588B4F3077.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/bump.hpp.4E76218A099EF6D3.idx
Binary file not shown.
Binary file removed .cache/clangd/index/bump_help.hpp.5927ED6C7530E243.idx
Binary file not shown.
Binary file removed .cache/clangd/index/bytes.hpp.063AA9A0A98EA5B4.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/class.hpp.66C24A01AFDBAB6E.idx
Binary file not shown.
Binary file removed .cache/clangd/index/config.hpp.2E9EB572C4945A79.idx
Binary file not shown.
Binary file removed .cache/clangd/index/control.hpp.0735CB677FE30CE5.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/cr_eol.hpp.C6A5303C0CE109FF.idx
Binary file not shown.
Binary file removed .cache/clangd/index/crlf_eol.hpp.641594B8D6B3D481.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/demangle.hpp.D0DE0BAD64D4E7BA.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/disable.hpp.F9AADAF370495F2D.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/discard.hpp.DADF17CF09EDD1F1.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/enable.hpp.5FCCAB9AD91BA0AF.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/eof.hpp.0AF4D00FC6196170.idx
Binary file not shown.
Binary file removed .cache/clangd/index/eol.hpp.58CE3EDD2686FA4E.idx
Binary file not shown.
Binary file removed .cache/clangd/index/eol.hpp.7510DF109A590C85.idx
Binary file not shown.
Binary file removed .cache/clangd/index/eol_pair.hpp.2F76926F9526278D.idx
Binary file not shown.
Binary file removed .cache/clangd/index/eolf.hpp.DD550758430D4B01.idx
Binary file not shown.
Binary file removed .cache/clangd/index/failure.hpp.808EA20785808A38.idx
Binary file not shown.
Binary file removed .cache/clangd/index/file_input.hpp.1E999AC9092E26BF.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/filesystem.hpp.8EA3D1D08AE7860D.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/has_apply.hpp.9AA2047051A36270.idx
Binary file not shown.
Binary file removed .cache/clangd/index/has_apply0.hpp.6C39E773775BB00F.idx
Binary file not shown.
Binary file removed .cache/clangd/index/has_match.hpp.7BA7DDFE6A802FA3.idx
Binary file not shown.
Binary file removed .cache/clangd/index/has_unwind.hpp.1AA091D07FF2FDBC.idx
Binary file not shown.
Binary file removed .cache/clangd/index/identifier.hpp.8A10D3FFE36E5A24.idx
Binary file not shown.
Binary file removed .cache/clangd/index/if_apply.hpp.927F8726F4F01AAB.idx
Binary file not shown.
Binary file removed .cache/clangd/index/if_must.hpp.BC7817D0431C61D6.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/input_pair.hpp.E740D5BB98C09EF2.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/istring.hpp.83A3DBEF2FC655D3.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/lf_eol.hpp.85FDF95F5DBA81C3.idx
Binary file not shown.
Binary file removed .cache/clangd/index/list.hpp.5498092000CDC1BA.idx
Binary file not shown.
Binary file removed .cache/clangd/index/list_must.hpp.71545AB8FE93E856.idx
Binary file not shown.
Binary file removed .cache/clangd/index/list_tail.hpp.9C53A5A4DCEC2CFA.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/marker.hpp.E4688DDCEA07750F.idx
Binary file not shown.
Binary file removed .cache/clangd/index/match.hpp.B53559DA53F2BC27.idx
Binary file not shown.
Binary file removed .cache/clangd/index/member.hpp.5EA8574C5187EE76.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/minus.hpp.4EE382A5F18D0A07.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/must.hpp.316253272ACBD294.idx
Binary file not shown.
Binary file removed .cache/clangd/index/must_if.hpp.A3118A6C6D083708.idx
Binary file not shown.
Binary file removed .cache/clangd/index/normal.hpp.7B9F3E7C1EC07775.idx
Binary file not shown.
Binary file removed .cache/clangd/index/not_at.hpp.CEECCC0654A32995.idx
Binary file not shown.
Binary file removed .cache/clangd/index/nothing.hpp.79E69B88FF8DBF46.idx
Binary file not shown.
Binary file removed .cache/clangd/index/one.hpp.49199C5F2AFC0DB9.idx
Binary file not shown.
Binary file removed .cache/clangd/index/opt.hpp.B8F38D411BA69796.idx
Binary file not shown.
Binary file removed .cache/clangd/index/pad.hpp.0BF9FCEA16709B14.idx
Binary file not shown.
Binary file removed .cache/clangd/index/pad_opt.hpp.6E9FF9085419524C.idx
Binary file not shown.
Binary file removed .cache/clangd/index/parse.hpp.F8464E4AFBECCD63.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/peek_char.hpp.E51C6E57CACB12A3.idx
Binary file not shown.
Binary file removed .cache/clangd/index/peek_utf8.hpp.1DB4525A781F3C61.idx
Binary file not shown.
Binary file removed .cache/clangd/index/pegtl.hpp.38C73FCEA438E058.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/plus.hpp.2623EE5219324063.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/raise.hpp.FAEB3DC48B392DA3.idx
Binary file not shown.
Binary file removed .cache/clangd/index/range.hpp.A0772F34A48C3022.idx
Binary file not shown.
Binary file removed .cache/clangd/index/ranges.hpp.6DACB5A41C11EFD8.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/rematch.hpp.7340E3EEAA84873C.idx
Binary file not shown.
Binary file removed .cache/clangd/index/rep.hpp.3B4AE16AE6C1C088.idx
Binary file not shown.
Binary file removed .cache/clangd/index/rep_min.hpp.CD8DA7CEE6D23194.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/rep_opt.hpp.6B30B85E312BAFD1.idx
Binary file not shown.
Binary file removed .cache/clangd/index/require.hpp.F97B980D59C5545B.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/rules.hpp.036694569A6C611E.idx
Binary file not shown.
Binary file removed .cache/clangd/index/rules.hpp.3059EB23A7C9CDE7.idx
Binary file not shown.
Binary file removed .cache/clangd/index/seq.hpp.4C4858F7D6372A39.idx
Binary file not shown.
Binary file removed .cache/clangd/index/sor.hpp.6C8CD7D248D2D17C.idx
Binary file not shown.
Binary file removed .cache/clangd/index/star.hpp.5107C99B4FB6A152.idx
Binary file not shown.
Binary file removed .cache/clangd/index/star_must.hpp.772BBAF9EF1BA094.idx
Binary file not shown.
Binary file removed .cache/clangd/index/state.hpp.1224D825994314DF.idx
Binary file not shown.
Binary file removed .cache/clangd/index/state.hpp.41D360C73EE053EE.idx
Binary file not shown.
Binary file removed .cache/clangd/index/string.hpp.BC8D5DE89F3ABDE2.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/success.hpp.34D28F162ED0D10B.idx
Binary file not shown.
Binary file removed .cache/clangd/index/test.cpp.7828DFB8590003CE.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/type.hpp.B893C5F3A6E7EE42.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/until.hpp.48CD3F860DC1F974.idx
Binary file not shown.
Binary file not shown.
Binary file removed .cache/clangd/index/utf8.hpp.8A95F52526E00040.idx
Binary file not shown.
Binary file removed .cache/clangd/index/version.hpp.CD1A333C6ADD494A.idx
Binary file not shown.
Binary file removed .cache/clangd/index/visit.hpp.98479A13E0D0D175.idx
Binary file not shown.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.dSYM
.DS_Store
build/
.cache
.cache/
8 changes: 4 additions & 4 deletions src/function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ namespace broma {
struct run_action<rule_begin<member_function_proto>> {
template <typename T>
static void apply(T& input, Root* root, ScratchData* scratch) {
scratch->wip_attributes = Attributes();
scratch->wip_attributes.links = scratch->wip_class.attributes.links;
scratch->wip_attributes.missing = scratch->wip_class.attributes.missing;

scratch->wip_mem_fn_proto = MemberFunctionProto();
}
};
Expand All @@ -106,10 +110,6 @@ namespace broma {
static void apply(T& input, Root* root, ScratchData* scratch) {
scratch->wip_mem_fn_proto.attributes = scratch->wip_attributes;

scratch->wip_attributes = Attributes();
scratch->wip_attributes.links = scratch->wip_class.attributes.links;
scratch->wip_attributes.missing = scratch->wip_class.attributes.missing;

for (auto& f : scratch->wip_class.fields) {
if (auto fn = f.get_fn()) {
if (*fn == scratch->wip_mem_fn_proto) {
Expand Down
6 changes: 4 additions & 2 deletions test/class.bro
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[[link(ios)]]
class Test {
///Woah
static void thing(int a, int c) = win 0x0;
int member(std::string str) = ios 0x3, mac 0x5;
int member2(std::string str) = ios 0x3, mac 0x5;
///Woah
void thing(int a, int c) = win 0x0;

mac, win {
PAD = 0x5;
Expand Down
3 changes: 3 additions & 0 deletions test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <iostream>

void print_func(broma::FunctionProto& func, broma::PlatformNumber& addrs) {

std::cout << "\tlinks: " << (long)func.attributes.links << "\n";
std::cout << "\t" << func.ret.name << " " << func.name << "(";
for (auto arg : func.args) {
std::cout << arg.first.name << " " << arg.second << ", ";
Expand All @@ -17,6 +19,7 @@ void print_func(broma::FunctionProto& func, broma::PlatformNumber& addrs) {
void print_ast(broma::Root& ast) {
std::cout << "Classes: " << ast.classes.size() << "\n";
for (auto cls : ast.classes) {
std::cout << "links: " << (long)cls.attributes.links << "\n";
std::cout << "class " << cls.name << " {\n";
for (auto field : cls.fields) {
if (auto func = field.get_as<broma::FunctionBindField>()) {
Expand Down

0 comments on commit 5bb5703

Please sign in to comment.