X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/17764b01280ac7cd2e14c82581fd8d185a437fef..0c172698f8957c8238cd9915ca09eb8a2b68db97:/Syntax.hpp?ds=sidebyside diff --git a/Syntax.hpp b/Syntax.hpp index ea55a3f..c710d89 100644 --- a/Syntax.hpp +++ b/Syntax.hpp @@ -40,7 +40,14 @@ double CYCastDouble(const char *value); double CYCastDouble(CYUTF8String value); void CYNumerify(std::ostringstream &str, double value); -void CYStringify(std::ostringstream &str, const char *data, size_t size, bool c = false); + +enum CYStringifyMode { + CYStringifyModeLegacy, + CYStringifyModeCycript, + CYStringifyModeNative, +}; + +void CYStringify(std::ostringstream &str, const char *data, size_t size, CYStringifyMode mode); // XXX: this really should not be here ... :/ void *CYPoolFile(CYPool &pool, const char *path, size_t *psize); @@ -839,6 +846,8 @@ struct CYTemplate : CYPrecedence(0) + virtual CYString *String(CYContext &context); + virtual CYTarget *Replace(CYContext &context); virtual void Output(CYOutput &out, CYFlags flags) const; }; @@ -2145,6 +2154,20 @@ struct CYTypeIntegral : virtual void Output(CYOutput &out) const; }; +struct CYTypeFloating : + CYTypeSpecifier +{ + int length_; + + CYTypeFloating(int length) : + length_(length) + { + } + + virtual CYTarget *Replace(CYContext &context); + virtual void Output(CYOutput &out) const; +}; + struct CYTypeVoid : CYTypeSpecifier {