Skip to content

Commit

Permalink
Refactored VSStringObject.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickyc975 committed Apr 29, 2020
1 parent 016f119 commit c47a3af
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 73 deletions.
7 changes: 7 additions & 0 deletions inc/objects/VSStringObject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
extern VSObject *vs_str(VSObject *, VSObject *const *args, vs_size_t nargs);

class VSStringObject : public VSObject {
private:
static const str_func_map vs_str_methods;

public:
std::string _value;

VSStringObject(std::string value);
~VSStringObject();

bool hasattr(std::string &attrname) override;
VSObject *getattr(std::string &attrname) override;
void setattr(std::string &attrname, VSObject *attrvalue) override;
};

#define AS_STRING(obj) ((VSStringObject *)obj)
Expand Down
Loading

0 comments on commit c47a3af

Please sign in to comment.