1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#pragma once
#include "Core/Object.h"
#include "Core/Str.h"
#include "Core/SrcPos.h"
namespace storm {
namespace syntax {
STORM_PKG(core.lang);
/**
* String object for use in the syntax.
*/
class SStr : public Object {
STORM_CLASS;
public:
SStr(const wchar *src);
SStr(const wchar *src, SrcPos pos);
STORM_CTOR SStr(Str *src);
STORM_CTOR SStr(Str *src, SrcPos pos);
// Position of this string.
SrcPos pos;
// String.
Str *v;
// Allow transforming an SStr.
Str *STORM_FN transform() const;
// Deep copy.
virtual void STORM_FN deepCopy(CloneEnv *env);
// Output.
virtual void STORM_FN toS(StrBuf *to) const;
};
}
}
|