aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/AssemblyStack.h
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-11-15 00:11:55 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-11-22 03:13:44 +0800
commitd67322a1861d60a88151f7c25d6c3478a9a39acf (patch)
treeaf485e48c3436cd24e2db09a6a1bcf445605bae1 /libsolidity/interface/AssemblyStack.h
parent80371e2d25ce3eb868d6f75b99a54af9dc6c1583 (diff)
downloaddexon-solidity-d67322a1861d60a88151f7c25d6c3478a9a39acf.tar.gz
dexon-solidity-d67322a1861d60a88151f7c25d6c3478a9a39acf.tar.zst
dexon-solidity-d67322a1861d60a88151f7c25d6c3478a9a39acf.zip
Introduce namespace `langutil` in liblangutil directory.
Also: - Use {}-style list initialisation for SourceLocation construction - Introduce new system includes - Changes the API of the Scanner to take source as value (with move) as opposed to as a reference
Diffstat (limited to 'libsolidity/interface/AssemblyStack.h')
-rw-r--r--libsolidity/interface/AssemblyStack.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/libsolidity/interface/AssemblyStack.h b/libsolidity/interface/AssemblyStack.h
index aad65ffc..d6ee33cf 100644
--- a/libsolidity/interface/AssemblyStack.h
+++ b/libsolidity/interface/AssemblyStack.h
@@ -29,11 +29,15 @@
#include <string>
#include <memory>
+namespace langutil
+{
+class Scanner;
+}
+
namespace dev
{
namespace solidity
{
-class Scanner;
namespace assembly
{
struct AsmAnalysisInfo;
@@ -61,7 +65,7 @@ public:
{}
/// @returns the scanner used during parsing
- Scanner const& scanner() const;
+ langutil::Scanner const& scanner() const;
/// Runs parsing and analysis steps, returns false if input cannot be assembled.
/// Multiple calls overwrite the previous state.
@@ -69,13 +73,13 @@ public:
/// Runs analysis step on the supplied block, returns false if input cannot be assembled.
/// Multiple calls overwrite the previous state.
- bool analyze(assembly::Block const& _block, Scanner const* _scanner = nullptr);
+ bool analyze(assembly::Block const& _block, langutil::Scanner const* _scanner = nullptr);
/// Run the assembly step (should only be called after parseAndAnalyze).
MachineAssemblyObject assemble(Machine _machine) const;
/// @returns the errors generated during parsing, analysis (and potentially assembly).
- ErrorList const& errors() const { return m_errors; }
+ langutil::ErrorList const& errors() const { return m_errors; }
/// Pretty-print the input after having parsed it.
std::string print() const;
@@ -86,13 +90,13 @@ private:
Language m_language = Language::Assembly;
EVMVersion m_evmVersion;
- std::shared_ptr<Scanner> m_scanner;
+ std::shared_ptr<langutil::Scanner> m_scanner;
bool m_analysisSuccessful = false;
std::shared_ptr<assembly::Block> m_parserResult;
std::shared_ptr<assembly::AsmAnalysisInfo> m_analysisInfo;
- ErrorList m_errors;
- ErrorReporter m_errorReporter;
+ langutil::ErrorList m_errors;
+ langutil::ErrorReporter m_errorReporter;
};
}