diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-06-01 17:23:01 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2017-06-01 17:23:01 -0700 |
commit | 0db29f6e05f03800b05b4778c118818149a193f9 (patch) | |
tree | 42aca780387f324b2b7361957dfaa2079aacd1a6 /src/wasm-s-parser.h | |
parent | f47d054dcc34dd709f36716c9fab07087db829e1 (diff) | |
download | binaryen-0db29f6e05f03800b05b4778c118818149a193f9.tar.gz binaryen-0db29f6e05f03800b05b4778c118818149a193f9.tar.bz2 binaryen-0db29f6e05f03800b05b4778c118818149a193f9.zip |
refactor s-expr parsing code to remove duplication and unnecessary things
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r-- | src/wasm-s-parser.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index b02b6523b..53594e7aa 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -53,10 +53,10 @@ class Element { public: Element(MixedArena& allocator) : isList_(true), list_(allocator), line(-1), col(-1), loc(nullptr) {} - bool isList() { return isList_; } - bool isStr() { return !isList_; } - bool dollared() { return isStr() && dollared_; } - bool quoted() { return isStr() && quoted_; } + bool isList() const { return isList_; } + bool isStr() const { return !isList_; } + bool dollared() const { return isStr() && dollared_; } + bool quoted() const { return isStr() && quoted_; } size_t line, col; SourceLocation* loc; @@ -69,8 +69,8 @@ public: } // string methods - cashew::IString str(); - const char* c_str(); + cashew::IString str() const; + const char* c_str() const; Element* setString(cashew::IString str__, bool dollared__, bool quoted__); Element* setMetadata(size_t line_, size_t col_, SourceLocation* loc_); |