aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.h
diff options
context:
space:
mode:
authorRJ Catalano <rcatalano@macsales.com>2016-02-09 05:43:22 +0800
committerRJ Catalano <rcatalano@macsales.com>2016-02-19 01:22:52 +0800
commit7b918a7bc7a3c619682266b1c2566dacb9dcc765 (patch)
treea8763b90b26cafff938c3cbc261fa85627ac4a8a /libsolidity/ast/AST.h
parentfca27b9ea00eb580f771820e967f62b58478c9a2 (diff)
downloaddexon-solidity-7b918a7bc7a3c619682266b1c2566dacb9dcc765.tar.gz
dexon-solidity-7b918a7bc7a3c619682266b1c2566dacb9dcc765.tar.zst
dexon-solidity-7b918a7bc7a3c619682266b1c2566dacb9dcc765.zip
changes to redefine the token list, the scanner, and the parser and how they pass around variable types of different sizes
not ready for change to FixedPoint just yet made this more const correct and added a switch statement for easier reading
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r--libsolidity/ast/AST.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index e1063467..d32d76a4 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -756,18 +756,17 @@ public:
class ElementaryTypeName: public TypeName
{
public:
- ElementaryTypeName(SourceLocation const& _location, Token::Value _type):
- TypeName(_location), m_type(_type)
- {
- solAssert(Token::isElementaryTypeName(_type), "");
- }
+ ElementaryTypeName(SourceLocation const& _location, ElementaryTypeNameToken const& _elem):
+ TypeName(_location), m_type(_elem)
+ {}
+
virtual void accept(ASTVisitor& _visitor) override;
virtual void accept(ASTConstVisitor& _visitor) const override;
- Token::Value typeName() const { return m_type; }
+ ElementaryTypeNameToken const& typeName() const { return m_type; }
private:
- Token::Value m_type;
+ ElementaryTypeNameToken m_type;
};
/**
@@ -1408,18 +1407,16 @@ private:
class ElementaryTypeNameExpression: public PrimaryExpression
{
public:
- ElementaryTypeNameExpression(SourceLocation const& _location, Token::Value _typeToken):
- PrimaryExpression(_location), m_typeToken(_typeToken)
- {
- solAssert(Token::isElementaryTypeName(_typeToken), "");
- }
+ ElementaryTypeNameExpression(SourceLocation const& _location, ElementaryTypeNameToken const& _type):
+ PrimaryExpression(_location), m_typeToken(_type)
+ {}
virtual void accept(ASTVisitor& _visitor) override;
virtual void accept(ASTConstVisitor& _visitor) const override;
- Token::Value typeToken() const { return m_typeToken; }
+ ElementaryTypeNameToken const& typeName() const { return m_typeToken; }
private:
- Token::Value m_typeToken;
+ ElementaryTypeNameToken m_typeToken;
};
/**